Rollup merge of #77961 - glandium:embed-bitcode, r=nagisa

Set .llvmbc and .llvmcmd sections as allocatable

This marks both sections as allocatable rather than excluded, which matches what
clang does with the equivalent `-fembed-bitcode` flag.
This commit is contained in:
Dylan DPC 2020-10-17 03:27:20 +02:00 committed by GitHub
commit 55f9676c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -936,8 +936,8 @@ unsafe fn embed_bitcode(
llvm::LLVMRustAppendModuleInlineAsm(llmod, asm.as_ptr().cast(), asm.len());
} else {
let asm = "
.section .llvmbc,\"e\"
.section .llvmcmd,\"e\"
.section .llvmbc,\"a\"
.section .llvmcmd,\"a\"
";
llvm::LLVMRustAppendModuleInlineAsm(llmod, asm.as_ptr().cast(), asm.len());
}