forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user