[all-commits] [llvm/llvm-project] ca3bdb: [MC][ELF] Change SHT_LLVM_CALL_GRAPH_PROFILE reloc...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Jun 24 21:36:02 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ca3bdb57fa1ac98b711a735de048c12b5fdd8086
https://github.com/llvm/llvm-project/commit/ca3bdb57fa1ac98b711a735de048c12b5fdd8086
Author: Fangrui Song <i at maskray.me>
Date: 2021-06-24 (Thu, 24 Jun 2021)
Changed paths:
M lld/ELF/Driver.cpp
M lld/ELF/InputFiles.cpp
M lld/ELF/InputFiles.h
M llvm/lib/MC/ELFObjectWriter.cpp
M llvm/lib/MC/MCELFStreamer.cpp
M llvm/test/MC/ELF/cgprofile.s
M llvm/test/tools/llvm-readobj/ELF/call-graph-profile.test
M llvm/test/tools/llvm-readobj/ELF/demangle.test
M llvm/tools/llvm-readobj/ELFDumper.cpp
Log Message:
-----------
[MC][ELF] Change SHT_LLVM_CALL_GRAPH_PROFILE relocations from SHT_RELA to SHT_REL
... even on targets preferring RELA. The section is only consumed by ld.lld
which can handle REL.
Follow-up to D104080 as I explained in the review. There are two advantages:
* The D104080 code only handles RELA, so arm/i386/mips32 etc may warn for -fprofile-use=/-fprofile-sample-use= usage.
* Decrease object file size for RELA targets
While here, change the relocation to relocate weights, instead of 0,1,2,3,..
I failed to catch the issue during review.
More information about the All-commits
mailing list