diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-11-23 13:16:39 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-11-23 13:16:39 +0000 |
commit | 17a23f4dc81c4d636032dcb8d4b171b1ce61189e (patch) | |
tree | 57d0f90b9fc4de9a83e49f989921d69b2f39cb3d /bfd/elf32-sparc.c | |
parent | f8236acacfc608c91b978b0bc5471ad4faee9a4b (diff) | |
download | gdb-17a23f4dc81c4d636032dcb8d4b171b1ce61189e.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/elf32-sparc.c')
-rw-r--r-- | bfd/elf32-sparc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index 94580619092..60a4dc76fa5 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -1221,7 +1221,15 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, || ((r_type == R_SPARC_PC10 || r_type == R_SPARC_PC22) && strcmp (h->root.root.string, - "_GLOBAL_OFFSET_TABLE_") != 0)))) + "_GLOBAL_OFFSET_TABLE_") != 0)) + && ((input_section->flags & SEC_ALLOC) != 0 + /* DWARF will emit R_SPARC_32 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)))) { /* In these cases, we don't need the relocation value. We check specially because in some |