diff options
Diffstat (limited to 'sysdeps/m68k/dl-machine.h')
-rw-r--r-- | sysdeps/m68k/dl-machine.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index fd8fb00103..33a5f76524 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -51,9 +51,15 @@ static inline Elf32_Addr elf_machine_load_address (void) { Elf32_Addr addr; +#ifdef SHARED asm (PCREL_OP ("lea", "_dl_start", "%0", "%0", "%%pc") "\n\t" "sub.l _dl_start@GOT.w(%%a5), %0" : "=a" (addr)); +#else + asm (PCREL_OP ("lea", "_dl_relocate_static_pie", "%0", "%0", "%%pc") "\n\t" + "sub.l _dl_relocate_static_pie@GOT.w(%%a5), %0" + : "=a" (addr)); +#endif return addr; } |