diff options
author | Alan Modra <amodra@gmail.com> | 2001-06-23 15:02:43 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-06-23 15:02:43 +0000 |
commit | 8c69491410fc58feb443b5b0a07b7a2eec85060c (patch) | |
tree | d4c663f2fda9365ca9903c59c509f5130199fb38 /bfd/elf32-i386.c | |
parent | 83be169b6235b32f5ca2e5bfdd9dc53c431d161a (diff) | |
download | gdb-8c69491410fc58feb443b5b0a07b7a2eec85060c.zip gdb-8c69491410fc58feb443b5b0a07b7a2eec85060c.tar.gz gdb-8c69491410fc58feb443b5b0a07b7a2eec85060c.tar.bz2 |
* elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
unresolved_reloc test to exclude cases where we use "relocation"
before setting it to point into the .got. Reinstate fudge for
unresolved relocs in debugging sections.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index ababa02..a628e0c 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1586,6 +1586,8 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, h->got.offset |= 1; } } + else + unresolved_reloc = false; } else { @@ -1632,7 +1634,6 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, abort (); relocation = htab->sgot->output_offset + off; - unresolved_reloc = false; break; case R_386_GOTOFF: @@ -1810,7 +1811,15 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, break; } - if (unresolved_reloc) + /* FIXME: Why do we allow debugging sections to escape this error? + More importantly, why do we not emit dynamic relocs for + R_386_32 above in debugging sections (which are ! SEC_ALLOC)? + If we had emitted the dynamic reloc, we could remove the + fudge here. */ + if (unresolved_reloc + && !(info->shared + && (input_section->flags & SEC_DEBUGGING) != 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) (*_bfd_error_handler) (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"), bfd_get_filename (input_bfd), |