forked from Imagelibrary/binutils-gdb
PR 10916
* symtab.cc (Symbol_table::add_from_relobj): When not exporting symbols from this object, don't change the visibility of an undefined symbol. * testsuite/exclude_libs_test_1.c (lib1_ref): New function.
This commit is contained in:
@@ -1151,7 +1151,8 @@ Symbol_table::add_from_relobj(
|
||||
}
|
||||
|
||||
// Fix up visibility if object has no-export set.
|
||||
if (relobj->no_export())
|
||||
if (relobj->no_export()
|
||||
&& (orig_st_shndx != elfcpp::SHN_UNDEF || !is_ordinary))
|
||||
{
|
||||
// We may have copied symbol already above.
|
||||
if (psym != &sym2)
|
||||
|
||||
Reference in New Issue
Block a user