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 717C9C43334 for ; Wed, 15 Jun 2022 13:22:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 28024844B1; Wed, 15 Jun 2022 15:21:38 +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="CPEp1RJb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DF24284478; Wed, 15 Jun 2022 15:21:32 +0200 (CEST) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 8DFDB839C3 for ; Wed, 15 Jun 2022 15:21:30 +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-x635.google.com with SMTP id u12so23168774eja.8 for ; Wed, 15 Jun 2022 06:21:30 -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=LZz9nMb41ih3udryM7OAU05cmrC0T5SgjXD/Ysd2FX8=; b=CPEp1RJbQZrL1HZlez9d5ZyUOZHXHjm9q/eU8/zygmSUaumYt279OBezwSUfiUEqGL mQuGauGA3ysrodZ3uB8qvtIvyZZeI+npz+gB1jTIvR6uTY5GTya10exb73oj7e0BL6j7 1Y55v0xC1+X/k8DIXQusauAT7macNqxui1GbEe7cjtkYS89E34MkhMqOSTlBtbHbCC/O qoq7htcKnTo3Ly9h2yHEkiBEkiZRqCObW1jaRFQqsY3LZNvKb2dozow24TgdLEdoCeWT nwBqSl3SoTdeUXwxJSF/tFZMbreDJqAdBjZm3ezLvgF5H7Tok36cJIZhVe3wNn4eQlCa PxYw== 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=LZz9nMb41ih3udryM7OAU05cmrC0T5SgjXD/Ysd2FX8=; b=0nUQVT/bKpV7Fz1qUABMygqe8IfBCxEUyqVChGqogU/q/qK3wAhCxKXAe8DTLcrw29 ooaA5IUS0nAosU+k8R1GaSLYSPAz9LdHM0rfDCvufSnZYkIFzaHskmB2/0n5PwDWAdwo xHES9rUzYUAllnbdCN2zX2ItrD1fhPj8VrpDF1MzPQxZh+67zIdlPIAygmowl4OSLVcd pcJq9iJMZIdvOc7Me6Per9lSjZwtdGtf/2W3rjEJB3E1rV+49SKJQ9ywpvqOzL9lkroc 8sB5RpwMCwMM0h5jYdE+yY2e/ruRMy5iWtSJxS8N/1zf1bjBNtJAGfyHiaRjFEhoSuDF fsTA== X-Gm-Message-State: AOAM533NmSiVxJR5IQLmXtOdQsJsv5kusuRv5Iq+Cq9iBA8tyceu8bvu +4iAvix2Mw7zzytj9owsoJ8daHAXDGjX0Q== X-Google-Smtp-Source: ABdhPJwLx+yBoJ1h2w5dyeJUBwE869AENFWcs0nQS7cAacn8nwXenZ0kRThA0hplZ/ELD14cZp+f/Q== X-Received: by 2002:a17:907:2d2a:b0:710:7ea6:2b9e with SMTP id gs42-20020a1709072d2a00b007107ea62b9emr8754174ejc.371.1655299289853; Wed, 15 Jun 2022 06:21:29 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id d1-20020a056402144100b00431665f1203sm9333683edx.73.2022.06.15.06.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 06:21:29 -0700 (PDT) From: Michal Simek X-Google-Original-From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Alistair Delva Subject: [PATCH v4 03/23] tools: relocate-rela: Use global variables Date: Wed, 15 Jun 2022 15:20:59 +0200 Message-Id: <7485b163e92f8f3f754c35f7c88c3314f2212efd.1655299267.git.michal.simek@amd.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: 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.5 at phobos.denx.de X-Virus-Status: Clean Declare rela_start/end and text_base as global variables. It will help with using these variables for ELF decoding. Signed-off-by: Michal Simek --- (no changes since v1) tools/relocate-rela.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c index 883987111869..67a138aa67d7 100644 --- a/tools/relocate-rela.c +++ b/tools/relocate-rela.c @@ -20,6 +20,8 @@ #define R_AARCH64_RELATIVE 1027 #endif +static uint64_t rela_start, rela_end, text_base; + static const bool debug_en; static void debug(const char *fmt, ...) @@ -63,7 +65,7 @@ int main(int argc, char **argv) { FILE *f; int i, num; - uint64_t rela_start, rela_end, text_base, file_size; + uint64_t file_size; if (argc != 5) { fprintf(stderr, "Statically apply ELF rela relocations\n"); -- 2.36.1