Skip to content

Commit

Permalink
[ELF] Use invokeOnRelocs. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Jul 27, 2024
1 parent 6efc377 commit c7231e4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lld/ELF/InputSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1073,11 +1073,7 @@ void InputSectionBase::relocate(uint8_t *buf, uint8_t *bufEnd) {
auto *sec = cast<InputSection>(this);
// For a relocatable link, also call relocateNonAlloc() to rewrite applicable
// locations with tombstone values.
const RelsOrRelas<ELFT> rels = sec->template relsOrRelas<ELFT>();
if (rels.areRelocsRel())
sec->relocateNonAlloc<ELFT>(buf, rels.rels);
else
sec->relocateNonAlloc<ELFT>(buf, rels.relas);
invokeOnRelocs(*sec, sec->relocateNonAlloc<ELFT>, buf);
}

// For each function-defining prologue, find any calls to __morestack,
Expand Down

0 comments on commit c7231e4

Please sign in to comment.