diff options
Diffstat (limited to 'src/base/loader/symtab.cc')
-rw-r--r-- | src/base/loader/symtab.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/base/loader/symtab.cc b/src/base/loader/symtab.cc index 439394852..853d98cc4 100644 --- a/src/base/loader/symtab.cc +++ b/src/base/loader/symtab.cc @@ -56,12 +56,13 @@ SymbolTable::insert(Addr address, string symbol) if (symbol.empty()) return false; - if (!addrTable.insert(make_pair(address, symbol)).second) - return false; - if (!symbolTable.insert(make_pair(symbol, address)).second) return false; + // There can be multiple symbols for the same address, so always + // update the addrTable multimap when we see a new symbol name. + addrTable.insert(make_pair(address, symbol)); + return true; } |