00db10
Backport of:
00db10
00db10
commit e9177fba13549a8e2a6232f46080e5c6d3e467b1
00db10
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
00db10
Date:   Wed Jun 21 13:47:07 2017 +0100
00db10
00db10
    [AArch64] Use hidden __GI__dl_argv in rtld startup code
00db10
    
00db10
    We rely on the symbol being locally defined so using extern symbol
00db10
    is not correct and the linker may complain about the relocations.
00db10
00db10
Adjusted to the old INTDEF/INTUSE mechanism.
00db10
00db10
diff --git a/ports/sysdeps/aarch64/dl-machine.h b/ports/sysdeps/aarch64/dl-machine.h
00db10
index 0e76ca8f146905ef..40b0587ba42cd59e 100644
00db10
--- a/ports/sysdeps/aarch64/dl-machine.h
00db10
+++ b/ports/sysdeps/aarch64/dl-machine.h
00db10
@@ -169,8 +169,8 @@ _dl_start_user:							\n\
00db10
 	cmp	x0, #0						\n\
00db10
 	bne	1b						\n\
00db10
 	// Update _dl_argv					\n\
00db10
-	adrp	x3, _dl_argv					\n\
00db10
-	str	x2, [x3, #:lo12:_dl_argv]			\n\
00db10
+	adrp	x3, _dl_argv_internal				\n\
00db10
+	str	x2, [x3, #:lo12:_dl_argv_internal]		\n\
00db10
 .L_done_stack_adjust:						\n\
00db10
 	// compute envp						\n\
00db10
 	add	x3, x2, x1, lsl #3				\n\