forked from OSchip/llvm-project
[ELF] Make addressOfAtom thread safe.
The expression _atomToAddressMap[atom] may modify _atomToAddressMap. llvm-svn: 182793
This commit is contained in:
parent
0d9d3110c7
commit
9ae1408556
|
@ -84,7 +84,8 @@ protected:
|
|||
|
||||
// This is called by the write section to apply relocations
|
||||
virtual uint64_t addressOfAtom(const Atom *atom) {
|
||||
return _atomToAddressMap[atom];
|
||||
auto addr = _atomToAddressMap.find(atom);
|
||||
return addr == _atomToAddressMap.end() ? 0 : addr->second;
|
||||
}
|
||||
|
||||
// This is a hook for creating default dynamic entries
|
||||
|
|
Loading…
Reference in New Issue