aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2008-08-07 19:50:05 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2008-08-07 19:50:05 +0000
commit63897e2cf09f3f6a7df0a3c95820f73f6d4d4535 (patch)
treee356e789aaaa1c16b8ad15c03bf8c2382df9f903 /bfd
parentf827c9a9d75000e77169da9b9bc531b0ce12a629 (diff)
downloadbinutils-63897e2cf09f3f6a7df0a3c95820f73f6d4d4535.zip
binutils-63897e2cf09f3f6a7df0a3c95820f73f6d4d4535.tar.gz
binutils-63897e2cf09f3f6a7df0a3c95820f73f6d4d4535.tar.bz2
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 93a132f..40a5085 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 24a3606..f3536fd 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. */