[PATCH] D107216: Revert [MC][ELF] Emit separate unique sections for different flags

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 31 10:49:30 PDT 2021


MaskRay added a comment.

In D107216#2918235 <https://reviews.llvm.org/D107216#2918235>, @nikic wrote:

> In D107216#2918203 <https://reviews.llvm.org/D107216#2918203>, @MaskRay wrote:
>
>>> This functionality is used by rustc to embed LTO bitcode with the SHF_EXCLUDE flag, and currently blocks our evaluation of the LLVM 13 release.
>>
>> But Rust usage is technically incorrect. I think Rust can carry its own patch to for the LLVM 13 release.
>
> I mean, we're happy to carry the patch, but that does mean that all distros are going to carry it as well (as they ship rust linked against system LLVM). I prefer upstreaming the fix over this being a "de facto" LLVM 13 patch that everyone is required to apply independently. I'll leave it to @tstellar to decide.
>
> To be clear, I don't particularly care about the change that D100944 <https://reviews.llvm.org/D100944> did, the only thing I care about is that it resulted in an effective loss of functionality. If it's possible to add a first-class way to set section flags in IR and backport it to LLVM 13, I will be perfectly happy with that.

Rust's current is flawed in another way: it assumes that module asm is emitted before rustc.embedded.module
The Rust workaround is weighted against breaking correctness and @tmatheson 's workflow.

Rust can try other approaches, e.g. replacing mixed module asm & rustc.embedded.module with pure module asm (`.ascii "abc"` or `.incbin "file"`).
That will not break correctness and @tmatheson 's workflow.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107216/new/

https://reviews.llvm.org/D107216



More information about the llvm-commits mailing list