llvm-project
85ec904b - [ELF] Include sharded relocations in RelocationBaseSection::getSize

Commit
16 days ago
[ELF] Include sharded relocations in RelocationBaseSection::getSize Although mergeRels is called prior to using this size for final layout, Writer::setReservedSymbolSections uses this in order to set the value of __rel[a]_iplt_end and, downstream in Morello LLVM, __rel[a]_dyn_end. Currently none of the relocations that can exist when static linking (as the case when these symbols are defined) are sharded, but a future commit will change this for R_AARCH64_AUTH_RELATIVE, and similarly R_MORELLO_RELATIVE is sharded downstream in Morello LLVM. Make sure we compute the right size when called prior to mergeRels, and add a regression test to demonstrate that R_AARCH64_AUTH_RELATIVE still gets the right __rel[a]_ipt_end in future even when sharding is adopted. Reviewers: MaskRay Reviewed By: MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/173285
Author
Parents
Loading