[lld] [ELF] Support relocatable files using CREL (PR #98115)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 11:00:47 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);
----------------
MaskRay wrote:
Renamed to invokeOnRelocs
https://github.com/llvm/llvm-project/pull/98115
More information about the llvm-commits
mailing list