aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-05-18 14:04:32 +0000
committerNick Clifton <nickc@redhat.com>2011-05-18 14:04:32 +0000
commitdd98f8d276fb5538228255c4da43dd755738d151 (patch)
treecc041c39a61d0cbd8b5c9d31b7ac6098383bf235 /bfd
parentd0da06e2dfbebf62eef7a2ec510240844972dbdb (diff)
downloadgdb-dd98f8d276fb5538228255c4da43dd755738d151.zip
gdb-dd98f8d276fb5538228255c4da43dd755738d151.tar.gz
gdb-dd98f8d276fb5538228255c4da43dd755738d151.tar.bz2
PR ld/12761
* elflink.c (elf_link_add_object_symbols): Process .gnu.warning sections when building shared libraries. * lib/ld-lib.exp (run_cc_link_tests): Add an optional 8th parameter - an expected warning message from the linker. * ld-elf/shared.exp (build_tests): Expect a warning message when building the libbarw.so library. * ld-elf/shared.exp: Run library building tests even when not building a native toolchain.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 02b1941..b9a0473 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-18 Nick Clifton <nickc@redhat.com>
+
+ PR ld/12761
+ * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
+ sections when building shared libraries.
+
2011-05-18 RafaƂ Krypa <r.krypa@samsung.com>
PR ld/12778
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b08b150..4675aab 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3423,7 +3423,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
.gnu.warning.SYMBOL are treated as warning symbols for the given
symbol. This differs from .gnu.warning sections, which generate
warnings when they are included in an output file. */
- if (info->executable)
+ /* PR 12761: Also generate this warning when building shared libraries. */
+ if (info->executable || info->shared)
{
asection *s;