diff options
author | Nick Clifton <nickc@redhat.com> | 2003-08-20 08:37:19 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-08-20 08:37:19 +0000 |
commit | 560e09e9cc912370081be5cccb8d3179a78928b2 (patch) | |
tree | 9191f0c21af30761875fd1741d540eacdea7b88f /bfd/elf32-i386.c | |
parent | 04d1ab347d16d701221fa1b49185d096e3158138 (diff) | |
download | gdb-560e09e9cc912370081be5cccb8d3179a78928b2.zip gdb-560e09e9cc912370081be5cccb8d3179a78928b2.tar.gz gdb-560e09e9cc912370081be5cccb8d3179a78928b2.tar.bz2 |
Better handking for unresolved symbols
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 77b5e36..11fadab 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -2154,42 +2154,9 @@ elf_i386_relocate_section (bfd *output_bfd, } else { - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + bfd_boolean warned; - relocation = 0; - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sec = h->root.u.def.section; - if (sec->output_section == NULL) - /* Set a flag that will be cleared later if we find a - relocation value for this symbol. output_section - is typically NULL for symbols satisfied by a shared - library. */ - unresolved_reloc = TRUE; - else - relocation = (h->root.u.def.value - + sec->output_section->vma - + sec->output_offset); - } - else if (h->root.type == bfd_link_hash_undefweak) - ; - else if (!info->executable - && !info->no_undefined - && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) - ; - else - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, - (info->executable || info->no_undefined - || ELF_ST_VISIBILITY (h->other))))) - return FALSE; - } + RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned); } switch (r_type) |