about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2017-06-21 13:47:07 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2017-07-12 16:55:41 +0100
commit7cdbe5b6f929b820b9dc92dbfa6ff48b4e6e133d (patch)
tree0690bf612ed6299c3a17619c8e10a1324776dac8
parent49f97e641e4e84a42246655d30adbc4756e67114 (diff)
downloadglibc-7cdbe5b6f929b820b9dc92dbfa6ff48b4e6e133d.tar.gz
glibc-7cdbe5b6f929b820b9dc92dbfa6ff48b4e6e133d.tar.xz
glibc-7cdbe5b6f929b820b9dc92dbfa6ff48b4e6e133d.zip
[AArch64] Use hidden __GI__dl_argv in rtld startup code
We rely on the symbol being locally defined so using extern symbol
is not correct and the linker may complain about the relocations.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/aarch64/dl-machine.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e3f6a29dce..31d18f53b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-12  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* sysdeps/aarch64/dl-machine.h (RTLD_START_1): Change _dl_argv to the
+	hidden __GI__dl_argv symbol.
+
 2017-07-06  Florian Weimer  <fweimer@redhat.com>
 	    H.J. Lu  <hongjiu.lu@intel.com>
 
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 84b8aecfb8..6067a1d8a0 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -193,8 +193,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\