diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/aarch64/start.S | 11 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2017-12-18 Szabolcs Nagy <szabolcs.nagy@arm.com> + + * sysdeps/aarch64/start.S (_start): Handle PIC && !SHARED case. + 2017-12-16 Aurelien Jarno <aurelien@aurel32.net> [BZ #22505] diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S index c20433ad73..0218f8d277 100644 --- a/sysdeps/aarch64/start.S +++ b/sysdeps/aarch64/start.S @@ -60,7 +60,8 @@ _start: /* Setup stack limit in argument register */ mov x6, sp -#ifdef SHARED +#ifdef PIC +# ifdef SHARED adrp x0, :got:main ldr PTR_REG (0), [x0, #:got_lo12:main] @@ -69,6 +70,14 @@ _start: adrp x4, :got:__libc_csu_fini ldr PTR_REG (4), [x4, #:got_lo12:__libc_csu_fini] +# else + adrp x0, main + add x0, x0, :lo12:main + adrp x3, __libc_csu_init + add x3, x3, :lo12:__libc_csu_init + adrp x4, __libc_csu_fini + add x4, x4, :lo12:__libc_csu_fini +# endif #else /* Set up the other arguments in registers */ MOVL (0, main) |