diff options
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 91a2b1e..6acdcc8 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -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); } |