summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2008-08-07 19:50:05 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2008-08-07 19:50:05 +0000
commitb2b97613d7eadb165632d5fb75548b1bbf90d17e (patch)
tree4f1384e9116fdda3f8033eeb8ffcd44bb7526ce2 /bfd
parentafc31b4210f098d8f0ee9b29592603bc9f5572a5 (diff)
downloadbinutils-redhat-b2b97613d7eadb165632d5fb75548b1bbf90d17e.tar.gz
bfd/
* elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning symbols. ld/testsuite/ * ld-mips-elf/reloc-estimate-1.d, ld-mips-elf/reloc-estimate-1.ld, ld-mips-elf/reloc-estimate-1a.s, ld-mips-elf/reloc-estimate-1b.s: New test. * ld-mips-elf/mips-elf.exp: Run it.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 93a132f661..40a50853d4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
+ symbols.
+
2008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
* elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 24a36062de..f3536fdd6e 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7460,6 +7460,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (htab->is_vxworks && !info->shared)
return TRUE;
+ /* Ignore indirect and warning symbols. All relocations against
+ such symbols will be redirected to the target symbol. */
+ if (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ return TRUE;
+
/* If this symbol is defined in a dynamic object, or we are creating
a shared library, we will need to copy any R_MIPS_32 or
R_MIPS_REL32 relocs against it into the output file. */