This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH COMMITTED][AArch64] Use hidden __GI__dl_argv in rtld startup code
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Wed, 21 Jun 2017 14:55:45 +0100
- Subject: [PATCH COMMITTED][AArch64] Use hidden __GI__dl_argv in rtld startup code
- Authentication-results: sourceware.org; auth=none
- Authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
We rely on the symbol being locally defined so using extern symbol
is not correct and the linker may complain about the relocations.
2017-06-21 Szabolcs Nagy <szabolcs.nagy@arm.com>
* sysdeps/aarch64/dl-machine.h (RTLD_START_1): Change _dl_argv to the
hidden __GI__dl_argv symbol.
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 02fab04f40..60472036f5 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -194,8 +194,8 @@ _dl_start_user: \n\
cmp " PTR "0, #0 \n\
bne 1b \n\
// Update _dl_argv \n\
- adrp x3, _dl_argv \n\
- str " PTR "2, [x3, #:lo12:_dl_argv] \n\
+ adrp x3, __GI__dl_argv \n\
+ str " PTR "2, [x3, #:lo12:__GI__dl_argv] \n\
.L_done_stack_adjust: \n\
// compute envp \n\
add " PTR "3, " PTR "2, " PTR "1, lsl #" PTR_SIZE_LOG " \n\