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