Message ID | 5196b98748115efc440507824d4087e2c5d7aef3.1654178252.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=1Be7eRTr; 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 4LDSQB64stz9sFr for <incoming@patchwork.ozlabs.org>; Fri, 3 Jun 2022 00:02:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 098E9843AF; Thu, 2 Jun 2022 16:00:28 +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="1Be7eRTr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4049E84388; Thu, 2 Jun 2022 15:58:38 +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-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 866338433D for <u-boot@lists.denx.de>; Thu, 2 Jun 2022 15:58:19 +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-x530.google.com with SMTP id v19so6384550edd.4 for <u-boot@lists.denx.de>; Thu, 02 Jun 2022 06:58:19 -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=gdvi5Rvq3hjZIRKJNH2mCOQkLHdosnkx0DUdUFg1DLU=; b=1Be7eRTr2hDv2tt1xbOshcitGydolTX25a3zrFomFQNRfpqJ0QXyYoc3hrnBwlVtWp K9OPzZl+nXiSm2La1K1TsGruo2BIgXDCj3y5veCKDJ8ATCAp3kBhfRQDR3si0yRqAs16 A2RusB1Im9aVhb3vDByUvAcUnYTbg95QchGFSE5DBEKIGXfnFPdwmq+mXeTrOVDhN2kn jgyuGPjlQqVitCgs0tH+zZZnAnoTQPzW4tkMEa+x0nBXbzI3ZT89w1fF3xcm6L89qRGP UBGH+1sUFeEc1tDRl7xO4a55Cd1yvWUe3QTKXMmVlPC2LtEjzbqsjSAboleeAPX6NWBK XF4Q== 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=gdvi5Rvq3hjZIRKJNH2mCOQkLHdosnkx0DUdUFg1DLU=; b=Zz/ulMO9hqOW6hlNLnp122yd3yuer11IbutlGuu+ryXu/fdYvV3jcuSq+oph1SOjaW uVjwH7UxD5lOcDsGR18sNSfLqM4zMOjJ1+sZYxGc5sLbsTWKqYeJ8EWeadgCAR61H09A Mej3oT1RXJtg1M5PCTVDcD24Oq3Mdpg52j3Yk+hNRgFlGHFmDW5sKPRawjcaRF/SlSwe mgzbmf7wElJ6+eJiOL25sbL3EnpNs3bQq/NKkftNGlHzuz/VB/93Pw6N3o13e2FEVq47 r/au5cjDFMBxCyGjMpgXDTouLMPsuY5gaGLv/n9D30NmtVKC/1WF0Ga3FA9iCTEGusSA RuyQ== X-Gm-Message-State: AOAM530ob47BHfYjwo+NuwLzIOnmYxPmKKOWRUamHYeIbOtLueIYGuDi D+E+L4bz7XHxFaVAwCP89G9cx0r49/VLhw== X-Google-Smtp-Source: ABdhPJzSxY5H4s7f5Xs77wUPaq1V9VnAB7jFh/HXmtIH4FbhF5l859RIcFpTHjAl5/nbrzh4uV5I4g== X-Received: by 2002:a05:6402:c0c:b0:42d:c7b8:dff5 with SMTP id co12-20020a0564020c0c00b0042dc7b8dff5mr5657884edb.251.1654178299063; Thu, 02 Jun 2022 06:58:19 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id p18-20020a17090628d200b006f3ef214dbesm1759114ejd.36.2022.06.02.06.58.18 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jun 2022 06:58:18 -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 19/22] tools: relocate-rela: Check that relocation works only for EM_AARCH64 Date: Thu, 2 Jun 2022 15:57:43 +0200 Message-Id: <5196b98748115efc440507824d4087e2c5d7aef3.1654178252.git.michal.simek@amd.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <cover.1654178252.git.michal.simek@amd.com> References: <cover.1654178252.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> --- tools/relocate-rela.c | 5 +++++ 1 file changed, 5 insertions(+)