Message ID | 36f26c8752335239344b265e5ddedad10e9cac8b.1655299267.git.michal.simek@amd.com |
---|---|
State | Accepted |
Commit | a1405d9cfedb1228289e617258de3fc0d7facecd |
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=l1IQeOis; 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 4LNQyy4q8sz9sPC for <incoming@patchwork.ozlabs.org>; Wed, 15 Jun 2022 23:25:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3DF5A84530; Wed, 15 Jun 2022 15:22:23 +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="l1IQeOis"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CDD798450F; Wed, 15 Jun 2022 15:22:02 +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-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 34440844FF for <u-boot@lists.denx.de>; Wed, 15 Jun 2022 15:21:59 +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-ed1-x52a.google.com with SMTP id v19so16135888edd.4 for <u-boot@lists.denx.de>; Wed, 15 Jun 2022 06:21:59 -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=l1IQeOisdTGpWwcWHtd2krBisgJ1Smw462Ra/i4EIaSJrOxtMs1jkfoBadvxJq/uxi JEgaOOiMOsq7CW21pJGXeN0ghEUa7J3iSx600dg+uJhk396GidxsvFwkKDbJPRyESPdL 4TfkVHtzWfTdiKEcwB0ztVOT0/ybeaW8gPRB/6OTkAp/MWU6KDW2gK6mLwbbaU6/FN4d cOjCJFe0HCaI/+O/HKbzYyjdUWG1kQoDXn+C0FPnrl97Hpwekv0uQQ8lgRu2M6y7mh08 P3OfCIrHZL+Q06hRO1uPZ6ofsDwxrUqkdbDlRxFABuH4QGkTKeeyoikmdd0D3Phl5m3N lHHg== 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=RwjzklRc2VloMJbZ6VK4TjwntK6hcZwdYeJUuSxZqdR7xZKP0C2BaR0skM4xtk8P02 398H1hMSoinPf9hPDnTuKJVMFbCJK7cLUuAYeCgJUXzGqTs3g/ZLwUqNy4w04By258Yb PFFO+WHnHfG8QBVZOmEKF5EMvxSYYDJ+j2HJD/C7JiGJ4m5bV8ETPtWjTSflbUWS2Ffs gL+psF7kYOHR02tzvc/frtlCRh7xAaAEA8TygTipbWVQ7IGrrlTwWQcmb91tkY8HsUZ2 /FxHEAvsx68EcU53cmU/44xu+Bb10wdFnPp+cQGorS0vdKrJRArwBwBNN01aKVscmStg 2mNQ== X-Gm-Message-State: AOAM533yyyjmjJPqM5qekAv1XEB1ZmEA0p45LY7Y6+eImnNQg74scWfY WiFuWSzQAApejK3gvQ/UptzCjr4m6l/FPQ== X-Google-Smtp-Source: ABdhPJyBeW6yS54mx3zb7XeIjt+Mq64JOok9NE12PD92TfxI/HB3fkA02fRPfztyH2IxO22/Mh1lTA== X-Received: by 2002:a05:6402:177b:b0:433:426d:83ea with SMTP id da27-20020a056402177b00b00433426d83eamr12900874edb.18.1655299318654; Wed, 15 Jun 2022 06:21:58 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id d9-20020a1709063ec900b006feb6dee4absm6326761ejj.137.2022.06.15.06.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 06:21:58 -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 v4 20/23] tools: relocate-rela: Check that relocation works only for EM_AARCH64 Date: Wed, 15 Jun 2022 15:21:16 +0200 Message-Id: <36f26c8752335239344b265e5ddedad10e9cac8b.1655299267.git.michal.simek@amd.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <cover.1655299267.git.michal.simek@amd.com> References: <cover.1655299267.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(+)