[PATCH] D116995: [gold] Ignore bitcode from sections inside object files

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 10:02:32 PST 2022


tstellar added a comment.

In D116995#3234756 <https://reviews.llvm.org/D116995#3234756>, @tejohnson wrote:

> A few comments and questions.
>
> First, it looks like lld works because it has a similar check guarding its call of InputFile::create (which is embedded in the BitcodeFile constructor).
>
> Note though I am seeing inconsistent info online as to what embedded bitcode is meant to be used for. It would be good to document this somewhere, like where fembed-bitcode is documented (which I am not finding). The initial submitter text when bcsection.ll was added suggests it was intended to be useful for LTO (https://reviews.llvm.org/D4371). I did find this recent discussion which indicates it was added for Apple recompilation: https://groups.google.com/g/llvm-dev/c/d1WSRvLefHQ/m/Iwm39FboAAAJ. I also found official ARM documentation online that points to the embedded .llvmbc section as being there to support LTO: https://developer.arm.com/documentation/dui0773/i/sbu1510240545830.

This discussion from rust is also relevant: https://github.com/rust-lang/rust/issues/90326

> But in any case, as noted above, lld does not support its use in LTO links, so I think this is just in need of clear documentation somewhere.
>
> Can you add a test?
>
> If bcsection.ll is deleted, its input file bcsection.s should as well.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116995



More information about the llvm-commits mailing list