diff options
author | David S. Miller <davem@davemloft.net> | 2012-09-27 21:33:54 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-27 21:33:54 -0700 |
commit | aa9bbfe6a79fce593ab3d298bb0e880d77eb7f71 (patch) | |
tree | ee985cd26a370995dd7eb89cece24126aea2d939 /sysdeps | |
parent | c39bc8b8254364fda301a89180130c3586859d75 (diff) | |
download | glibc-aa9bbfe6a79fce593ab3d298bb0e880d77eb7f71.tar.gz glibc-aa9bbfe6a79fce593ab3d298bb0e880d77eb7f71.tar.xz glibc-aa9bbfe6a79fce593ab3d298bb0e880d77eb7f71.zip |
Fix sparc64 crashes with LD_BIND_NOW and --enable-bind-now.
[BZ #14376] * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Do not pass reloc->r_addend in as the 'high' argument to sparc64_fixup_plt when handling R_SPARC_JMP_IREL relocations.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/sparc/sparc64/dl-machine.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 35c24d1558..2f8bbe1786 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -458,7 +458,14 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, break; case R_SPARC_JMP_IREL: value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap)); - /* Fall thru */ + /* 'high' is always zero, for large PLT entries the linker + emits an R_SPARC_IRELATIVE. */ +#ifdef RESOLVE_CONFLICT_FIND_MAP + sparc64_fixup_plt (NULL, reloc, reloc_addr, value, 0, 0); +#else + sparc64_fixup_plt (map, reloc, reloc_addr, value, 0, 0); +#endif + break; case R_SPARC_JMP_SLOT: #ifdef RESOLVE_CONFLICT_FIND_MAP /* R_SPARC_JMP_SLOT conflicts against .plt[32768+] |