aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-08-25 13:37:29 -0700
committerFangrui Song <i@maskray.me>2020-08-25 13:37:29 -0700
commit82d0749749fafb0303414131dc570781376fdcfb (patch)
treea5bca539394e632c8e9d820b60b04961d36e4b81 /clang/lib/Lex/ModuleMap.cpp
parent514d6e9a8d91e739292c9024d677b8d3c6d43f0c (diff)
downloadllvm-82d0749749fafb0303414131dc570781376fdcfb.zip
llvm-82d0749749fafb0303414131dc570781376fdcfb.tar.gz
llvm-82d0749749fafb0303414131dc570781376fdcfb.tar.bz2
[TargetLoweringObjectFileImpl] Make .llvmbc and .llvmcmd non-SHF_ALLOC
There are two ways .llvmbc can be produced: * clang -c -fembed-bitcode=all (which also produces .llvmcmd) * LTO backend: ld.lld -mllvm -lto-embed-bitcode or -plugin-opt=-lto-embed-bitcode .llvmbc and .llvmcmd have the SHF_ALLOC flag, so they can be dropped by --gc-sections. This patch sets SectionKind::Metadata to drop the SHF_ALLOC flag. This is conceptually correct: the two sections are not part of the process image, so SHF_ALLOC is not appropriate. `test/LTO/X86/embed-bitcode.ll`: changed `llvm-objcopy -O binary --only-section` to `llvm-objcopy --dump-section`. `-O binary` does not dump non-SHF_ALLOC sections. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D86374
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions