summaryrefslogtreecommitdiff
path: root/bfd/elf64-sparc.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-09-24 15:54:22 +0000
committerJakub Jelinek <jakub@redhat.com>2002-09-24 15:54:22 +0000
commit6b3ac70943f1b38c2f3e50e90752bdbe9b35bdeb (patch)
tree5bb56107b81d05f24814ffd6b59cda974744748b /bfd/elf64-sparc.c
parent109987229e3d1f3ae632f8477da9be47a4a8a147 (diff)
downloadbinutils-6b3ac70943f1b38c2f3e50e90752bdbe9b35bdeb.tar.gz
binutils-6b3ac70943f1b38c2f3e50e90752bdbe9b35bdeb.tar.bz2
binutils-6b3ac70943f1b38c2f3e50e90752bdbe9b35bdeb.zip
* elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
addend into r_addend, not *r_offset. (elf32_sparc_finish_dynamic_symbol): Likewise. * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at R_SPARC_RELATIVE's r_offset.
Diffstat (limited to 'bfd/elf64-sparc.c')
-rw-r--r--bfd/elf64-sparc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 764b0d75a91..f79d76c30bd 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2727,11 +2727,12 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
else
{
- bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_GLOB_DAT);
rela.r_addend = 0;
}
+ bfd_put_64 (output_bfd, (bfd_vma) 0,
+ sgot->contents + (h->got.offset &~ (bfd_vma) 1));
bfd_elf64_swap_reloca_out (output_bfd, &rela,
((Elf64_External_Rela *) srela->contents
+ srela->reloc_count));