Skip to content

Commit

Permalink
Rollup merge of rust-lang#77961 - glandium:embed-bitcode, r=nagisa
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dylan-DPC authored Oct 17, 2020
2 parents 47cc22f + 684d142 commit dad0198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_llvm/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit dad0198

Please sign in to comment.