aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-12-07 13:32:02 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-12-07 13:32:02 +0000
commite5d080028db61d00aed864b1d487bf6e8e20a7e7 (patch)
treef659847816c14332f0bb05b425b48053b80a90ce /bfd
parent8c9343347a640515b2536a87c884497ae4a38022 (diff)
downloadgdb-e5d080028db61d00aed864b1d487bf6e8e20a7e7.zip
gdb-e5d080028db61d00aed864b1d487bf6e8e20a7e7.tar.gz
gdb-e5d080028db61d00aed864b1d487bf6e8e20a7e7.tar.bz2
bfd/
2006-12-07 H.J. Lu <hjl@gnu.org> PR ld/3666 * elflink.c (elf_link_add_object_symbols): Keep symbol visibility for symbols from discarded section. ld/testsuite/ 2006-12-07 H.J. Lu <hjl@gnu.org> PR ld/3666 * ld-elf/group3a.d: New file. * ld-elf/group3a.s: Likewise. * ld-elf/group3b.d: Likewise. * ld-elf/group3b.s: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8b1911c..5e41f14 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2006-12-07 H.J. Lu <hjl@gnu.org>
+
+ PR ld/3666
+ * elflink.c (elf_link_add_object_symbols): Keep symbol
+ visibility for symbols from discarded section.
+
2006-12-06 Alan Modra <amodra@bigpond.net.au>
* elf64-alpha.c (elf64_alpha_merge_symbol_attribute): New function.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b0227d8..be018ba 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3682,12 +3682,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
sec = bfd_abs_section_ptr;
else if (sec->kept_section)
{
- /* Symbols from discarded section are undefined, and have
- default visibility. */
+ /* Symbols from discarded section are undefined. We keep
+ its visibility. */
sec = bfd_und_section_ptr;
isym->st_shndx = SHN_UNDEF;
- isym->st_other = (STV_DEFAULT
- | (isym->st_other & ~ ELF_ST_VISIBILITY (-1)));
}
else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
value -= sec->vma;