diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/m68k/dl-machine.h | 6 |
2 files changed, 12 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2017-10-20 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/m68k/dl-machine.h (elf_machine_load_address): Use + _dl_relocate_static_pie instead of _dl_start to compute load + address in static PIE. + +2017-10-20 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/m68k/start.S (_start): Check PIC instead of SHARED. 2017-10-20 Mike FABIAN <mfabian@redhat.com> diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index fd8fb00..33a5f76 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; } |