[all-commits] [llvm/llvm-project] 24129f: [LLD] Adding support for RELA for CG Profile.
Alexander Yermolovich via All-commits
all-commits at lists.llvm.org
Tue Jul 13 13:57:01 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 24129fbc9aa006badc2e6e8432980cb94aba090c
https://github.com/llvm/llvm-project/commit/24129fbc9aa006badc2e6e8432980cb94aba090c
Author: Alexander Yermolovich <ayermolo at fb.com>
Date: 2021-07-13 (Tue, 13 Jul 2021)
Changed paths:
M lld/ELF/Driver.cpp
M lld/ELF/InputFiles.cpp
M lld/ELF/InputFiles.h
A lld/test/ELF/cgprofile-rela.test
M llvm/test/tools/llvm-readobj/ELF/call-graph-profile.test
M llvm/tools/llvm-readobj/ELFDumper.cpp
Log Message:
-----------
[LLD] Adding support for RELA for CG Profile.
This is a follow up to https://reviews.llvm.org/D104080, and https://github.com/llvm/llvm-project/commit/ca3bdb57fa1ac98b711a735de048c12b5fdd8086#diff-e64a48fabe31db213a631fdc5f2acb51bdddf3f16a8fb2928784f4c579229585. The implementation of call graph profile was changed from a black box section to relocation approach. This was done to be compatible with post processing tools like strip/objcopy, and llvm equivalent. When they are invoked on object file before the final linking step with this new approach the symbol indices correctness is preserved.
The GNU binutils tools change the REL section to RELA section, unlike llvm tools. For example when strip -S is run on the ELF object files, as an intermediate step before linking. To preserve compatibility this patch extends implementation in LLD and ELFDumper to support both REL and RELA sections for call graph profile.
Reviewed By: MaskRay, jhenderson
Differential Revision: https://reviews.llvm.org/D105217
More information about the All-commits
mailing list