diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-10-05 14:45:17 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-10-05 14:45:17 -0700 |
commit | a0d49154d4a471cd36954408b29a348a091efaa3 (patch) | |
tree | b4df8acaf073d72072c11cea50e1f9d6d60430dc /bfd/elflink.c | |
parent | e753e154bf8a1f507b43e03dec04b341dde3f429 (diff) | |
download | gdb-a0d49154d4a471cd36954408b29a348a091efaa3.zip gdb-a0d49154d4a471cd36954408b29a348a091efaa3.tar.gz gdb-a0d49154d4a471cd36954408b29a348a091efaa3.tar.bz2 |
Don't re-export common symbols
For ELF linker, a common symbol isn't a definition. When we decide if a
symbol should be re-exported, we should check if the symbol isn't
undefined, not if it is a definition.
bfd/
PR ld/18914
* elflink.c (elf_link_add_object_symbols): Don't re-export a
symbol if it isn't undefined.
ld/testsuite/
PR ld/18914
* ld-elf/exclude.exp: Also check exclude_common.
* ld-elf/exclude2.s: Add exclude_common.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 90af6cf..94bb710 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -4216,7 +4216,7 @@ error_free_dyn: /* If this symbol has default visibility and the user has requested we not re-export it, then mark it as hidden. */ - if (definition + if (!bfd_is_und_section (sec) && !dynamic && abfd->no_export && ELF_ST_VISIBILITY (isym->st_other) != STV_INTERNAL) |