[clang] [llvm] [X86] Set .llvmbc and .llvmcmd to exclude sections (PR #151910)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 4 09:04:42 PDT 2025


MaskRay wrote:

This is incorrect. Some use cases require the sections to be combined during linking and adding ELF SHF_EXCLUDE would break the usage. https://reviews.llvm.org/D86374

If you want these flags to be relocatable files only, specify `/DISCARD/` in a linker script to discard them or discard them post-linking with llvm-objcopy.

https://github.com/llvm/llvm-project/pull/151910


More information about the llvm-commits mailing list