aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ip2k.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-08-20 08:37:19 +0000
committerNick Clifton <nickc@redhat.com>2003-08-20 08:37:19 +0000
commit560e09e9cc912370081be5cccb8d3179a78928b2 (patch)
tree9191f0c21af30761875fd1741d540eacdea7b88f /bfd/elf32-ip2k.c
parent04d1ab347d16d701221fa1b49185d096e3158138 (diff)
downloadgdb-560e09e9cc912370081be5cccb8d3179a78928b2.zip
gdb-560e09e9cc912370081be5cccb8d3179a78928b2.tar.gz
gdb-560e09e9cc912370081be5cccb8d3179a78928b2.tar.bz2
Better handking for unresolved symbols
Diffstat (limited to 'bfd/elf32-ip2k.c')
-rw-r--r--bfd/elf32-ip2k.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 4cb28bb..e8cb177 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1532,33 +1532,12 @@ ip2k_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes [r_symndx - symtab_hdr->sh_info];
+ bfd_boolean warned;
+ bfd_boolean unresolved_reloc;
- 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;
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
name = h->root.root.string;
-
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- relocation = h->root.u.def.value + BASEADDR (sec);
- }
-
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
-
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (! info->shared || info->no_undefined))))
- return FALSE;
- relocation = 0;
- }
}
/* Finally, the sole IP2K-specific part. */