[PATCH] D126950: [lld][WebAssembly] Retain data segments referenced via __start/__stop
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 20:30:04 PDT 2022
MaskRay added a comment.
In D126950#3558024 <https://reviews.llvm.org/D126950#3558024>, @kateinoigakukun wrote:
> In D126950#3558023 <https://reviews.llvm.org/D126950#3558023>, @MaskRay wrote:
>
>>> As well as ELF linker does, retain all data segments named X referenced through __start_X or __stop_X.
>>
>> lld doesn't do this by default. This behavior requires `-z nostart-stop-gc`.
>>
>> Not force retaining `X` allows fine-grained GC of metadata sections: https://maskray.me/blog/2021-01-31-metadata-sections-comdat-and-shf-link-order
>
> Ah right, so my description is valid with GNU ld sorry. I'm going to add the option and make it default in wasm-ld.
`-z start-stop-gc` is the ideal behavior. I am concerned the behavior as defaulted by this patch will make incur unnecessary size costs to metadata sections.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126950/new/
https://reviews.llvm.org/D126950
More information about the llvm-commits
mailing list