[lld] [lld][WebAssembly] Match the ELF linker in transitioning away from archive indexes. (PR #78658)

Alex Crichton via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 13:37:08 PST 2024


alexcrichton wrote:

Aha it appears my memory has definitely failed me! IIRC we didn't use the wasm object file format because we couldn't figure out at the time how to encode the metadata somewhere such that `wasm-ld` wouldn't include it in the output. In other backends [flags are set](https://github.com/rust-lang/rust/blob/cb4d9a1902b3ea17e93872dafb76d24aa6295c47/compiler/rustc_codegen_ssa/src/back/metadata.rs#L469-L476) such as `SHF_EXCLUDE` to keep the `.rmeta` section out of the final output but we couldn't figure out the equivalent for wasm.

Do you know of a way that metadata could be placed into a wasm-looking object file in a way that doesn't end up in the final output?

https://github.com/llvm/llvm-project/pull/78658


More information about the llvm-commits mailing list