summaryrefslogtreecommitdiffstats
path: root/bfd/elflink.c
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/elflink.c
parentd0da06e2dfbebf62eef7a2ec510240844972dbdb (diff)
downloadppe42-binutils-dd98f8d276fb5538228255c4da43dd755738d151.tar.gz
ppe42-binutils-dd98f8d276fb5538228255c4da43dd755738d151.zip
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/elflink.c')
-rw-r--r--bfd/elflink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b08b150845..4675aab82a 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;
OpenPOWER on IntegriCloud