aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-02-14 14:15:52 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-02-14 14:15:52 +0000
commitfab4a87f1bd9ec148d24bdaca9faf0f6bded94aa (patch)
treece747bd2c90f481a27b2d8a487ff00b5372cd9f7 /bfd
parentb279a55c19a2826fa8b5b08ec13e8df13ff5b9f5 (diff)
downloadgdb-fab4a87f1bd9ec148d24bdaca9faf0f6bded94aa.zip
gdb-fab4a87f1bd9ec148d24bdaca9faf0f6bded94aa.tar.gz
gdb-fab4a87f1bd9ec148d24bdaca9faf0f6bded94aa.tar.bz2
bfd/
2007-02-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/3953 * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol when adding default symbol. ld/testsuite/ 2007-02-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/3953 * ld-elf/beginwarn.c: New file. * ld-elf/warn.out: Likewise. * ld-elf/shared.exp (build_tests): Add "Build warn libbar.so". (run_tests): Add "Run warn with versioned libfoo.so". * lib/ld-lib.exp (default_ld_relocate): Make exec_output global and remove target first. (default_ld_link): Likewise. (default_ld_simple_link): Likewise. (run_ld_link_exec_tests): Take an optional linker warning and check it. (default_ld_link): Check pruned linker output.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fd34de2..d8ebc0d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3953
+ * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
+ when adding default symbol.
+
2007-02-13 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
diff --git a/bfd/elflink.c b/bfd/elflink.c
index d76faae..00baf5d 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1556,6 +1556,10 @@ _bfd_elf_add_default_symbol (bfd *abfd,
hi = h;
}
+ /* Check if HI is a warning symbol. */
+ if (hi->root.type == bfd_link_hash_warning)
+ hi = (struct elf_link_hash_entry *) hi->root.u.i.link;
+
/* If there is a duplicate definition somewhere, then HI may not
point to an indirect symbol. We will have reported an error to
the user in that case. */