aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/aarch64/crti.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/aarch64/crti.S')
-rw-r--r--sysdeps/aarch64/crti.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/aarch64/crti.S b/sysdeps/aarch64/crti.S
index 53ccb42..5c42fd5 100644
--- a/sysdeps/aarch64/crti.S
+++ b/sysdeps/aarch64/crti.S
@@ -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: