aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2009-12-10 14:20:04 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2009-12-10 14:20:04 +0000
commite7e2196da3f0157573acc1b4fa2f7a87da9f044f (patch)
treed53254d0337939a0dae85ff5cf0b6b974bc85712 /bfd/elfxx-mips.c
parentb59befec8e8a9bec906f2a0ae623db822c9ef2cd (diff)
downloadfsf-binutils-gdb-e7e2196da3f0157573acc1b4fa2f7a87da9f044f.zip
fsf-binutils-gdb-e7e2196da3f0157573acc1b4fa2f7a87da9f044f.tar.gz
fsf-binutils-gdb-e7e2196da3f0157573acc1b4fa2f7a87da9f044f.tar.bz2
bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Correct handling of undefined symbols. ld/testsuite/ * ld-mips-elf/undefined.d: New test. * ld-mips-elf/undefined.s: Source for the new test. * ld-mips-elf/mips-elf.exp: Run the new test.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 3a1c8ba..9df441d 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -4973,15 +4973,17 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf */
symbol = 0;
}
+ else if ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.root.string, input_bfd,
+ input_section, relocation->r_offset,
+ (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+ || ELF_ST_VISIBILITY (h->root.other)))
+ {
+ return bfd_reloc_undefined;
+ }
else
{
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.root.string, input_bfd,
- input_section, relocation->r_offset,
- (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
- || ELF_ST_VISIBILITY (h->root.other))))
- return bfd_reloc_undefined;
- symbol = 0;
+ return bfd_reloc_notsupported;
}
target_is_16_bit_code_p = ELF_ST_IS_MIPS16 (h->root.other);