Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bolt/include/bolt/Core/BinaryContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ class BinaryContext {
return FragmentClasses.isEquivalent(LHS, RHS);
}

/// Add interprocedural reference for \p Function to \p Address
/// Add interprocedural branch reference from \p Function to \p Address.
void addInterproceduralReference(BinaryFunction *Function, uint64_t Address) {
InterproceduralReferences.push_back({Function, Address});
}
Expand All @@ -1128,7 +1128,8 @@ class BinaryContext {
/// argument is false.
bool handleAArch64Veneer(uint64_t Address, bool MatchOnly = false);

/// Resolve inter-procedural dependencies from
/// Resolve inter-procedural branch dependencies discovered during
/// disassembly.
void processInterproceduralReferences();

/// Skip functions with all parent and child fragments transitively.
Expand Down
6 changes: 3 additions & 3 deletions bolt/lib/Core/BinaryContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,6 @@ void BinaryContext::processInterproceduralReferences() {
continue;
}

// Check if address falls in function padding space - this could be
// unmarked data in code. In this case adjust the padding space size.
ErrorOr<BinarySection &> Section = getSectionForAddress(Address);
assert(Section && "cannot get section for referenced address");

Expand All @@ -1451,7 +1449,7 @@ void BinaryContext::processInterproceduralReferences() {
if (SectionName == ".plt" || SectionName == ".plt.got")
continue;

// Check if it is aarch64 veneer written at Address
// Check if it is aarch64 veneer written at Address.
if (isAArch64() && handleAArch64Veneer(Address))
continue;

Expand All @@ -1463,6 +1461,8 @@ void BinaryContext::processInterproceduralReferences() {
exit(1);
}

// Check if the address falls into the function padding space - this could
// be an unmarked data in code. In this case, adjust the padding space size.
TargetFunction = getBinaryFunctionContainingAddress(Address,
/*CheckPastEnd=*/false,
/*UseMaxSize=*/true);
Expand Down
Loading