aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-sparc.c
diff options
context:
space:
mode:
authorJames Clarke <jrtc27@jrtc27.com>2016-06-28 12:00:56 +0100
committerNick Clifton <nickc@redhat.com>2016-06-28 12:00:56 +0100
commit7160c10d6530b79ea45d435933b07765f610f54d (patch)
tree16edffe83c4a976ac178ae15d6f7a0306c89c603 /bfd/elfxx-sparc.c
parent6c9a7fb62fcddbcafba8ab765e6fe190482c3d0a (diff)
downloadgdb-7160c10d6530b79ea45d435933b07765f610f54d.zip
gdb-7160c10d6530b79ea45d435933b07765f610f54d.tar.gz
gdb-7160c10d6530b79ea45d435933b07765f610f54d.tar.bz2
Don't convert R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64.
bfd * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64. gold * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64. (Target_sparc::Scan::global): Likewise. ld * testsuite/ld-elf/symbolic-func.r: Allow non-zero offsets from .text.
Diffstat (limited to 'bfd/elfxx-sparc.c')
-rw-r--r--bfd/elfxx-sparc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 3c47255..63558c7 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -3481,7 +3481,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
}
else
{
- if (r_type == R_SPARC_32 || r_type == R_SPARC_64)
+ if ( (!ABI_64_P (output_bfd) && r_type == R_SPARC_32)
+ || (ABI_64_P (output_bfd) && r_type == R_SPARC_64))
{
outrel.r_info = SPARC_ELF_R_INFO (htab, NULL,
0, R_SPARC_RELATIVE);