summaryrefslogtreecommitdiff
path: root/libc/ports/sysdeps/aarch64/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/ports/sysdeps/aarch64/dl-machine.h')
-rw-r--r--libc/ports/sysdeps/aarch64/dl-machine.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/ports/sysdeps/aarch64/dl-machine.h b/libc/ports/sysdeps/aarch64/dl-machine.h
index c91b0c42e..71dd6b389 100644
--- a/libc/ports/sysdeps/aarch64/dl-machine.h
+++ b/libc/ports/sysdeps/aarch64/dl-machine.h
@@ -36,8 +36,8 @@ elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
static inline ElfW(Addr) __attribute__ ((unused))
elf_machine_dynamic (void)
{
- ElfW(Addr) addr = (ElfW(Addr)) &_DYNAMIC;
- return addr;
+ extern const ElfW(Addr) _GLOBAL_OFFSET_TABLE_[] attribute_hidden;
+ return _GLOBAL_OFFSET_TABLE_[0];
}
/* Return the run-time load address of the shared object. */