diff options
author | Ian Lance Taylor <iant@google.com> | 2007-12-21 23:31:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-12-21 23:31:19 +0000 |
commit | 99f8facac923848a9496cc34235b608e05a7f160 (patch) | |
tree | d35f563ca6e357ff8ff87d3d3e45c2098b702f46 /gold/symtab.cc | |
parent | dc96b90a103d5363c3bb298178b6ae3c5124aa19 (diff) | |
download | gdb-99f8facac923848a9496cc34235b608e05a7f160.zip gdb-99f8facac923848a9496cc34235b608e05a7f160.tar.gz gdb-99f8facac923848a9496cc34235b608e05a7f160.tar.bz2 |
From Cary Coutant: Fix handling of versioned symbols, add some tests.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index d39d739..4a1c5ee 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -480,10 +480,18 @@ Symbol_table::add_from_object(Object* object, // NAME/NULL point to NAME/VERSION. insdef.first->second = ret; } - else if (insdef.first->second != ret) + else if (insdef.first->second != ret + && insdef.first->second->is_undefined()) { // This is the unfortunate case where we already have - // entries for both NAME/VERSION and NAME/NULL. + // entries for both NAME/VERSION and NAME/NULL. Note + // that we don't want to combine them if the existing + // symbol is going to override the new one. FIXME: We + // currently just test is_undefined, but this may not do + // the right thing if the existing symbol is from a + // shared library and the new one is from a regular + // object. + const Sized_symbol<size>* sym2; sym2 = this->get_sized_symbol SELECT_SIZE_NAME(size) ( insdef.first->second |