mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
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:
parent
48c5c55f2f
commit
1c74fab0d1
@ -1,3 +1,11 @@
|
||||
2009-12-30 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
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.
|
||||
|
||||
2009-12-30 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
PR 10861
|
||||
|
@ -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)
|
||||
|
@ -2,6 +2,8 @@ void lib1_default (void);
|
||||
void lib1_hidden (void);
|
||||
void lib1_internal (void);
|
||||
void lib1_protected (void);
|
||||
void lib1_ref (void);
|
||||
extern void lib2_default (void);
|
||||
|
||||
void __attribute__((visibility ("default")))
|
||||
lib1_default (void)
|
||||
@ -22,3 +24,9 @@ void __attribute__((visibility ("protected")))
|
||||
lib1_protected (void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
lib1_ref (void)
|
||||
{
|
||||
lib2_default ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user