From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6293BC04A68 for ; Wed, 27 Jul 2022 14:34:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C934083FFF; Wed, 27 Jul 2022 16:34:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=kpnmail.nl header.i=@kpnmail.nl header.b="peCJYZa/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 269E884007; Wed, 27 Jul 2022 16:34:19 +0200 (CEST) Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.184]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9064783445 for ; Wed, 27 Jul 2022 16:34:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=kettenis@openbsd.org X-KPN-MessageId: 321ac5be-0db9-11ed-bd66-005056994fde Received: from smtp.kpnmail.nl (unknown [10.31.155.8]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id 321ac5be-0db9-11ed-bd66-005056994fde; Wed, 27 Jul 2022 16:34:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kpnmail.nl; s=kpnmail01; h=mime-version:message-id:date:subject:to:from; bh=ljHPXEgZWLa1iyi7oC3mq30C3Py4r59BYK4cONT+ySs=; b=peCJYZa/X/NJiRBfxzvboctvROBAq79H0+CkvUdwvDEwRNCAo0eEFWOe03mP4IDgEeyQty4N7LRig zQSRZqvdtvovuRyMGLmdSOZ+Tkjh5dVFoDUPrtTQJeHh9wJXKf+C8FJkhD6xSxgvmEGmy8oUXpxZBB Trmgih+041IipmKo= X-KPN-MID: 33|itRUK7/2KwZf9D8U3GlATV3d32Q4wO5DPVkkSkmkjDCCXYNEFKot3yz1J4CRfJg cRGaOxkHvHS/0SLFopo2/mLVr8U31u43YKidgo1BZZUU= X-KPN-VerifiedSender: No X-CMASSUN: 33|gopwWcxxUh4xcrl7hXuyGeg+DXukpK8h9DKX3Rc8w7OQiuuI/Pw/oFXOp/F8Wd8 +uwD/x5mgLa9GFZN8k9IBLg== X-Originating-IP: 80.61.163.207 Received: from copland.sibelius.xs4all.nl (80-61-163-207.fixed.kpn.net [80.61.163.207]) by smtp.xs4all.nl (Halon) with ESMTPSA id 30b84c77-0db9-11ed-9b28-00505699d6e5; Wed, 27 Jul 2022 16:34:15 +0200 (CEST) From: Mark Kettenis To: u-boot@lists.denx.de Cc: Michal Simek , Tom Rini , Mark Kettenis Subject: [PATCH] tools: relocate-rela: Don't assume defines Microblaze stuff Date: Wed, 27 Jul 2022 16:34:05 +0200 Message-Id: <20220727143405.52368-1-kettenis@openbsd.org> X-Mailer: git-send-email 2.37.1 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The contents of differ between OSes. It may only define the relocation types for the host architecture, and may not contain machine-specific defines for more obscure architectures (such as Microblaze) at all. Define the relevant constants for Microblaze locally if they are not provided by . Fixes: 034944b33bc8 ("tools: relocate-rela: Add support for 32bit Microblaze relocation") Signed-off-by: Mark Kettenis --- tools/relocate-rela.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c index 090fb1acb2..c57c3cfade 100644 --- a/tools/relocate-rela.c +++ b/tools/relocate-rela.c @@ -20,6 +20,26 @@ #define R_AARCH64_RELATIVE 1027 #endif +#ifndef EM_MICROBLAZE +#define EM_MICROBLAZE 189 +#endif + +#ifndef R_MICROBLAZE_NONE +#define R_MICROBLAZE_NONE 0 +#endif + +#ifndef R_MICROBLAZE_32 +#define R_MICROBLAZE_32 1 +#endif + +#ifndef R_MICROBLAZE_REL +#define R_MICROBLAZE_REL 16 +#endif + +#ifndef R_MICROBLAZE_GLOB_DAT +#define R_MICROBLAZE_GLOB_DAT 18 +#endif + static int ei_class; static uint64_t rela_start, rela_end, text_base, dyn_start; -- 2.37.1