When filling the .got sections, InputSection::OutSecOff was added twice to find the position to apply a relocation: first time in InputSection::writeTo() and then in SectionBase::getOffset().
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
It looks like it's not the only problem for .got but for all sections. How does it work for other sections?
Comment Actions
As far as I could check, other sections are not affected by the similar problem. Most of them don't call relocate*() methods. InputSection::writeTo uses unshifted Buf when calling relocate(). And EhInputSection avoids the problem because SectionBase::getOffset() doesn't add OutSecOff for them.