diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2006-12-07 13:32:02 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2006-12-07 13:32:02 +0000 |
commit | e5d080028db61d00aed864b1d487bf6e8e20a7e7 (patch) | |
tree | f659847816c14332f0bb05b425b48053b80a90ce /bfd/elflink.c | |
parent | 8c9343347a640515b2536a87c884497ae4a38022 (diff) | |
download | gdb-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/elflink.c')
-rw-r--r-- | bfd/elflink.c | 6 |
1 files changed, 2 insertions, 4 deletions
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; |