mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-11 18:06:03 +08:00
* symtab.cc (Symbol_table::add_from_dynobj): Only look for weak
aliases for symbols defined in the same object. * testsuite/Makefile.am (check_PROGRAMS): Add weak_alias_test. (weak_alias_test_SOURCES): New variable. (weak_alias_test_DEPENDENCIES): New variable. (weak_alias_test_LDFLAGS): New variable. (weak_alias_test_LDADD): New variable. (weak_alias_test_1_pic.o, weak_alias_test_1.so): New targets. (weak_alias_test_2_pic.o, weak_alias_test_2.so): New targets. (weak_alias_test_3.o): New target. (weak_alias_test_4_pic.o, weak_alias_test_4.so): New targets. * testsuite/weak_alias_test_main.cc: New file. * testsuite/weak_alias_test_1.cc: New file. * testsuite/weak_alias_test_2.cc: New file. * testsuite/weak_alias_test_3.cc: New file.
This commit is contained in:
@ -1006,8 +1006,12 @@ Symbol_table::add_from_dynobj(
|
||||
}
|
||||
}
|
||||
|
||||
// Note that it is possible that RES was overridden by an
|
||||
// earlier object, in which case it can be aliased here.
|
||||
if (sym.get_st_shndx() != elfcpp::SHN_UNDEF
|
||||
&& sym.get_st_type() == elfcpp::STT_OBJECT)
|
||||
&& sym.get_st_type() == elfcpp::STT_OBJECT
|
||||
&& res->source() == Symbol::FROM_OBJECT
|
||||
&& res->object() == dynobj)
|
||||
object_symbols.push_back(res);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user