aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachinePassManager.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-08-12 20:14:00 -0700
committerFangrui Song <i@maskray.me>2020-08-13 08:14:45 -0700
commit88498f44dfe7d9b886f2622335cdeae4dbf2b02a (patch)
treef63ef82cabe06da8d25ed525af07bab42f447f13 /llvm/lib/CodeGen/MachinePassManager.cpp
parent7f8c49b016003a1a642235b14788648736809a58 (diff)
downloadllvm-88498f44dfe7d9b886f2622335cdeae4dbf2b02a.zip
llvm-88498f44dfe7d9b886f2622335cdeae4dbf2b02a.tar.gz
llvm-88498f44dfe7d9b886f2622335cdeae4dbf2b02a.tar.bz2
[ELF] -r: allow SHT_X86_64_UNWIND to be merged into SHT_PROGBITS
* For .cfi_*, GCC/GNU as emits SHT_PROGBITS type .eh_frame sections. * Since rL252300, clang emits SHT_X86_64_UNWIND type .eh_frame sections (originated from Solaris, documented in the x86-64 psABI). * Some assembly use `.section .eh_frame,"a",@unwind` to generate SHT_X86_64_UNWIND .eh_frame sections. In a non-relocatable link, input .eh_frame are combined and there is only one SyntheticSection .eh_frame in the output section, so the "section type mismatch" diagnostic does not fire. In a relocatable link, there is no SyntheticSection .eh_frame. .eh_frame of mixed types can trigger the diagnostic. This patch fixes it by adding another special case 0x70000001 (= SHT_X86_64_UNWIND) to canMergeToProgbits(). ld.lld -r gcc.o clang.o => error: section type mismatch for .eh_frame There was a discussion "RFC: Usefulness of SHT_X86_64_UNWIND" on the x86-64-abi mailing list. Folks are not wild about making the psABI value 0x70000001 into gABI, but a few think defining 0x70000001 for .eh_frame may be a good idea for a new architecture. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D85785
Diffstat (limited to 'llvm/lib/CodeGen/MachinePassManager.cpp')
0 files changed, 0 insertions, 0 deletions