diff mbox series

[v2,03/23] tools: relocate-rela: Use global variables

Message ID 2d65fc56c3785f2e1ad4d2d21f84856ca5c7c268.1654589430.git.michal.simek@amd.com
State Superseded
Delegated to: Michal Simek
Headers show
Series microblaze: Add support for full relocation | expand

Commit Message

Michal Simek June 7, 2022, 8:10 a.m. UTC
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 <michal.simek@amd.com>
---

(no changes since v1)

 tools/relocate-rela.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

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");