From 436e1ebaccb69bb0a723708984c1b1bbdb0f3d14 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 20 Jul 2013 09:50:16 +0000 Subject: [PATCH] PR ld/15762 PR ld/12761 * elflink.c (elf_link_add_object_symbols): Don't clobber .gnu.warning.symbol sections when shared. --- bfd/ChangeLog | 7 +++++++ bfd/elflink.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d3d6ace6eec..319e61015dd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2013-07-20 Alan Modra + + PR ld/15762 + PR ld/12761 + * elflink.c (elf_link_add_object_symbols): Don't clobber + .gnu.warning.symbol sections when shared. + 2013-07-19 Nick Clifton * elf32-rx.c (rx_elf_relocate_section): Fix typo: move diff --git a/bfd/elflink.c b/bfd/elflink.c index 34bbcd51dfc..55f00da08c9 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3444,7 +3444,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) FALSE, bed->collect, NULL))) goto error_return; - if (! info->relocatable) + if (!info->relocatable && !info->shared) { /* Clobber the section size so that the warning does not get copied into the output file. */ -- 2.30.2