summaryrefslogtreecommitdiff
path: root/sysdeps/aarch64/crti.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/aarch64/crti.S')
-rw-r--r--sysdeps/aarch64/crti.S7
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/aarch64/crti.S b/sysdeps/aarch64/crti.S
index 53ccb42587..2b213758b2 100644
--- a/sysdeps/aarch64/crti.S
+++ b/sysdeps/aarch64/crti.S
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for AArch64.
- Copyright (C) 1995-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -39,6 +39,7 @@
they can be called as functions. The symbols _init and _fini are
magic and cause the linker to emit DT_INIT and DT_FINI. */
+#include <sysdep.h>
#include <libc-symbols.h>
#ifndef PREINIT_FUNCTION
@@ -60,7 +61,7 @@
.type call_weak_fn, %function
call_weak_fn:
adrp x0, :got:PREINIT_FUNCTION
- ldr x0, [x0, #:got_lo12:PREINIT_FUNCTION]
+ ldr PTR_REG (0), [x0, #:got_lo12:PREINIT_FUNCTION]
cbz x0, 1f
b PREINIT_FUNCTION
1:
@@ -71,6 +72,7 @@ call_weak_fn:
.section .init,"ax",%progbits
.align 2
.global _init
+ .hidden _init
.type _init, %function
_init:
stp x29, x30, [sp, -16]!
@@ -84,6 +86,7 @@ _init:
.section .fini,"ax",%progbits
.align 2
.global _fini
+ .hidden _fini
.type _fini, %function
_fini:
stp x29, x30, [sp, -16]!