[lld] [ELF] Support relocatable files using CREL (PR #98115)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 09:02:54 PDT 2024
================
@@ -1073,11 +1107,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);
+ doRelocs(*sec, sec->relocateNonAlloc, buf);
----------------
smithp35 wrote:
I'm wondering whether invokeRelocs or invokeOnRelocs to match invokeELFT may be a better name for the macro?
https://github.com/llvm/llvm-project/pull/98115
More information about the llvm-commits
mailing list