Skip to content

Commit

Permalink
Fix a range extension thunk creation issue
Browse files Browse the repository at this point in the history
Previously, we failed to create range extension thunks if we have
a very large input section.
  • Loading branch information
rui314 committed Jan 3, 2025
1 parent 88d5e74 commit 2352ec6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/thunks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void OutputSection<E>::create_range_extension_thunks(Context<E> &ctx) {
c++;

// Move A forward so that A is reachable from C.
i64 c_offset = (c == m.size()) ? offset : m[c]->offset;
i64 c_offset = (c == d) ? offset : m[c]->offset;
while (a < b && m[a]->offset + branch_distance<E> < c_offset)
a++;

Expand Down

0 comments on commit 2352ec6

Please sign in to comment.