[lld] [lld][COFF] Don't truncate .llvm. and llvm_ section names (PR #229112)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 01:56:15 PDT 2026
matthew-j-code wrote:
> > > Is it not possible to consider a compliant name on PE/COFF? `.lloffld` or `.offload` would fit the constraints and while it shuffles the work to the consumer, it remains more portable.
> >
> >
> > This would certainly be possible, but we can't think of a scenario where this kind of portability would matter: the contents of these .llvm sections (metadata, bitcode, ...) are only relevant in an LLVM environment and can only be parsed by LLVM tooling, so any consumer will always have LLVM's long-section-name-aware COFF reader available. This is different from @mstorsjo libunwind scenario, which has a section with dedicated metadata that can be parsed by libunwind without requiring libLLVM.
>
> I do think that it might be nice if we can stay within the specification of PE/COFF.
We considered that but it would require modifications in all code that reads or writes .llvm* sections in LLVM. LLD would need to map all long names to short names, and any place in LLVM that reads these sections would need to check for both the long and the short name. This would be without a clear benefit as these sections would still only ever be ready by LLVM.
https://github.com/llvm/llvm-project/pull/229112
More information about the llvm-commits
mailing list