summaryrefslogtreecommitdiff
path: root/bfd/elf64-sparc.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-11-23 13:16:39 +0000
committerJakub Jelinek <jakub@redhat.com>2001-11-23 13:16:39 +0000
commite4e5ffa0977e1881c851ba3b84a76bbd969372dc (patch)
tree897154d5024d6c3670c4f0e39bbbe04c36be3e7d /bfd/elf64-sparc.c
parent433b1a6c5c953c3924c10e204802fcace3799f87 (diff)
downloadbinutils-redhat-e4e5ffa0977e1881c851ba3b84a76bbd969372dc.tar.gz
* elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
relocations in non-alloced sections against global symbols defined in shared library being built. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf64-sparc.c')
-rw-r--r--bfd/elf64-sparc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 6af2b15166..9a918166de 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2053,7 +2053,15 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared
&& ((!info->symbolic && h->dynindx != -1)
|| !(h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR)))
+ & ELF_LINK_HASH_DEF_REGULAR))
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_SPARC_{32,64} relocations in
+ its sections against symbols defined externally
+ in shared libraries. We can't do anything
+ with them here. */
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))
skip_it = true;
break;
}