Skip to content

Commit f8782e4

Browse files
author
Alex B
committed
Address Feedback Nr.2
1 parent ec0c7ea commit f8782e4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lld/MachO/ConcatOutputSection.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ uint64_t TextOutputSection::estimateStubsInRangeVA(size_t callIdx) const {
194194
});
195195
uint64_t existingForwardThunks = thunks.end() - itPostcallIdxThunks;
196196

197-
// Estimate the address after which call sites can safely call stubs
198-
// directly rather than through intermediary thunks.
199197
uint64_t forwardBranchRange = target->forwardBranchRange;
200198
assert(isecEnd > forwardBranchRange &&
201199
"should not run thunk insertion if all code fits in jump range");
@@ -219,8 +217,8 @@ uint64_t TextOutputSection::estimateStubsInRangeVA(size_t callIdx) const {
219217
// Estimated maximum VA of last stub.
220218
uint64_t maxVAOfLastStub = maxTextSize + in.stubs->getSize();
221219

222-
// Calculaate the first address that is gueranteed to not need a thunk to
223-
// reach any stub.
220+
// Estimate the address after which call sites can safely call stubs
221+
// directly rather than through intermediary thunks.
224222
uint64_t stubsInRangeVA = maxVAOfLastStub - forwardBranchRange;
225223

226224
log("thunks = " + std::to_string(thunkMap.size()) +

0 commit comments

Comments
 (0)