forked from OSchip/llvm-project
[BOLT] Fix symbol table issue with ICF
Summary: Not all symbol table entries were updated after ICF. (cherry picked from FBD19319685)
This commit is contained in:
parent
ac697b7d3a
commit
d57513e4ab
|
@ -2035,8 +2035,9 @@ BinaryContext::getBinaryFunctionContainingAddress(uint64_t Address,
|
|||
BinaryFunction *
|
||||
BinaryContext::getBinaryFunctionAtAddress(uint64_t Address, bool Shallow) {
|
||||
if (const auto *BD = getBinaryDataAtAddress(Address)) {
|
||||
auto *BF = getFunctionForSymbol(BD->getSymbol());
|
||||
if (BF && BF->getAddress() == Address) {
|
||||
uint64_t EntryID{0};
|
||||
auto *BF = getFunctionForSymbol(BD->getSymbol(), &EntryID);
|
||||
if (BF && EntryID == 0) {
|
||||
while (BF->getParentFunction() && !Shallow) {
|
||||
BF = BF->getParentFunction();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue