summary refs log tree commit diff
path: root/sysdeps/sparc/sparc64/dl-irel.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-06-07 19:51:06 -0700
committerDavid S. Miller <davem@davemloft.net>2011-06-07 19:51:06 -0700
commit9b849836f534bbd250a6733ebc1edf32e5f4d5dc (patch)
treeeb61bca9d2a94781588f322f7ae37345667bc43c /sysdeps/sparc/sparc64/dl-irel.h
parent5a31b2836d55bcc0c5b6f90f1e89245118e7f508 (diff)
downloadglibc-9b849836f534bbd250a6733ebc1edf32e5f4d5dc.tar.gz
glibc-9b849836f534bbd250a6733ebc1edf32e5f4d5dc.tar.xz
glibc-9b849836f534bbd250a6733ebc1edf32e5f4d5dc.zip
sparc: Fix LD_BIND_NOW with multiarch.
Diffstat (limited to 'sysdeps/sparc/sparc64/dl-irel.h')
-rw-r--r--sysdeps/sparc/sparc64/dl-irel.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/sparc/sparc64/dl-irel.h b/sysdeps/sparc/sparc64/dl-irel.h
index 1a2a0a3dd5..0d70e2a448 100644
--- a/sysdeps/sparc/sparc64/dl-irel.h
+++ b/sysdeps/sparc/sparc64/dl-irel.h
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <dl-plt.h>
+#include <ldsodefs.h>
 
 #define ELF_MACHINE_IRELA	1
 
@@ -36,13 +37,13 @@ elf_irela (const Elf64_Rela *reloc)
   if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
     {
       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
+      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       *reloc_addr = value;
     }
   else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
     {
       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
+      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
       struct link_map map = { .l_addr = 0 };
 
       /* 'high' is always zero, for large PLT entries the linker