Message ID | 85158ecd602d340cde081f0c980350183b74de18.1655287429.git.michal.simek@amd.com |
---|---|
State | Superseded |
Delegated to: | Michal Simek |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=3bvC2Yev; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LNLb46rBnz9t6h for <incoming@patchwork.ozlabs.org>; Wed, 15 Jun 2022 20:07:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBBD1844EE; Wed, 15 Jun 2022 12:04:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="3bvC2Yev"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3376844CE; Wed, 15 Jun 2022 12:04:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 792E9844CA for <u-boot@lists.denx.de>; Wed, 15 Jun 2022 12:04:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x62c.google.com with SMTP id fu3so22148450ejc.7 for <u-boot@lists.denx.de>; Wed, 15 Jun 2022 03:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VKUw6J/gZfUvpP7Lb6U4eb3qNPtQ3DikkajbnXxO+kU=; b=3bvC2YevTa4SIXE7KcBF8NK3WyEzZqL1TkJiq0HP2lNbBSarKLi4M16IFxb17vxy7l 6GrxHHJLGkN3V6Q1LA1mvNCOD+U5h+JsLgd72hsqZdQP09S4hWqzJxGE/hAY3WYqXmoB 8HrGaX4cmFfbuS6SrngCHnL4tQxtM7bo4OIx57oI+bc8ulIVad1wxamWVw4aXFHBXHCB DOPVTbzaNjokcy7hbrygvrAYOqEP4tzYwayrM1zeyv1IazODQNXgHFILtm4R5RNx62SN SscHofmFtld6u2jCi8iFHKGkVd3rex6D2MuDS+wnkdqSviZ/Go8VN7eij+qgnVQTke/3 a2Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VKUw6J/gZfUvpP7Lb6U4eb3qNPtQ3DikkajbnXxO+kU=; b=ToqZ0MSgLkXhkZKwn3AO4KiUCiQ4Y2ocztJKN7jVw75qWhGq3pxwdlDN6H4FwjAD04 wdSJH9XdTi0dEpY7wCBMjCgMUIrRPlQ0Y3Co+kewDpund1SSj66KYtfl8ZICXk5r7Npi 9tHRtrxMqYFd9ucdrJpyEWIb0xda70hiLCde7tQ+l96OAwRrjRSzV5h7ZER0kqLuKX8l 6eO0zQj5q6gYbXog56SuHmPO1zJdgwt+52kkB7uvfoonlE+W4zHkPQXS5HQKKSCwmuFN E/UOE4KYMWamJQSIwKvHOe2O3qaXDN7LG4GqFYW/PNUhFoajxwrIrJfJ/cvyKdSe0xHQ P3yg== X-Gm-Message-State: AOAM531wHDfdH8C0NKSqnEa5sQvLo43YkY8JyHbOHnZqj7nei6YuMqcR tX3z4Rkes/kkeiBNsKqsMeCJz+80iRj4EQ== X-Google-Smtp-Source: ABdhPJx4Im60q5NV/xJoabHOu315FDZOGfQrcm8Wn47fAYblyaHnRRFs6RevMxx9SBnptAi3fNu5/Q== X-Received: by 2002:a17:907:7da2:b0:711:f36e:b855 with SMTP id oz34-20020a1709077da200b00711f36eb855mr8403512ejc.308.1655287480833; Wed, 15 Jun 2022 03:04:40 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id 14-20020a170906328e00b006fee961b9e0sm6023702ejw.195.2022.06.15.03.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 03:04:40 -0700 (PDT) From: Michal Simek <monstr@monstr.eu> X-Google-Original-From: Michal Simek <michal.simek@amd.com> To: u-boot@lists.denx.de, git@xilinx.com Cc: Alistair Delva <adelva@google.com> Subject: [PATCH v3 20/23] tools: relocate-rela: Check that relocation works only for EM_AARCH64 Date: Wed, 15 Jun 2022 12:03:57 +0200 Message-Id: <85158ecd602d340cde081f0c980350183b74de18.1655287429.git.michal.simek@amd.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <cover.1655287429.git.michal.simek@amd.com> References: <cover.1655287429.git.michal.simek@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean |
Series |
microblaze: Add support for full relocation
|
expand
|
diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c index e62247d51e2a..2f7f1796a0ef 100644 --- a/tools/relocate-rela.c +++ b/tools/relocate-rela.c @@ -79,6 +79,11 @@ static int decode_elf64(FILE *felf, char **argv) machine = header.e_machine; debug("Machine\t%d\n", machine); + if (machine != EM_AARCH64) { + fprintf(stderr, "%s: Not supported machine type\n", argv[0]); + return 30; + } + text_base = header.e_entry; section_header_base = header.e_shoff; section_header_size = header.e_shentsize * header.e_shnum;
Relocation support is only for EM_AARCH64 that's why check machine type to make sure that the code will never run on any unsupported one. Signed-off-by: Michal Simek <michal.simek@amd.com> --- (no changes since v1) tools/relocate-rela.c | 5 +++++ 1 file changed, 5 insertions(+)