aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32
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/sparc32
parent5a31b2836d55bcc0c5b6f90f1e89245118e7f508 (diff)
downloadglibc-9b849836f534bbd250a6733ebc1edf32e5f4d5dc.tar
glibc-9b849836f534bbd250a6733ebc1edf32e5f4d5dc.tar.gz
glibc-9b849836f534bbd250a6733ebc1edf32e5f4d5dc.tar.bz2
glibc-9b849836f534bbd250a6733ebc1edf32e5f4d5dc.zip
sparc: Fix LD_BIND_NOW with multiarch.
Diffstat (limited to 'sysdeps/sparc/sparc32')
-rw-r--r--sysdeps/sparc/sparc32/dl-irel.h5
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h8
2 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/sparc/sparc32/dl-irel.h b/sysdeps/sparc/sparc32/dl-irel.h
index 1891938d6d..2753fb4ceb 100644
--- a/sysdeps/sparc/sparc32/dl-irel.h
+++ b/sysdeps/sparc/sparc32/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 Elf32_Rela *reloc)
if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
{
Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
- Elf32_Addr value = ((Elf32_Addr (*) (void)) reloc->r_addend) ();
+ Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
*reloc_addr = value;
}
else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
{
Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
- Elf32_Addr value = ((Elf32_Addr (*) (void)) reloc->r_addend) ();
+ Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
sparc_fixup_plt (reloc, reloc_addr, value, 0, 1);
}
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 9631db32e1..f8e8fe4179 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -399,7 +399,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
&& __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
{
- value = ((Elf32_Addr (*) (void)) value) ();
+ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
}
switch (r_type)
@@ -430,11 +430,11 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
*reloc_addr = value;
break;
case R_SPARC_IRELATIVE:
- value = ((Elf32_Addr (*) (void)) value) ();
+ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
*reloc_addr = value;
break;
case R_SPARC_JMP_IREL:
- value = ((Elf32_Addr (*) (void)) value) ();
+ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
/* Fall thru */
case R_SPARC_JMP_SLOT:
{
@@ -562,7 +562,7 @@ elf_machine_lazy_rel (struct link_map *map,
else if (r_type == R_SPARC_JMP_IREL)
{
Elf32_Addr value = map->l_addr + reloc->r_addend;
- value = ((Elf32_Addr (*) (void)) value) ();
+ value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
sparc_fixup_plt (reloc, reloc_addr, value, 1, 1);
}
else if (r_type == R_SPARC_NONE)