[PATCH] D128094: [WebAssembly][Object] Remove requirement that objects must have code sections
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 17 13:51:26 PDT 2022
dschuff added inline comments.
================
Comment at: llvm/lib/Object/WasmObjectFile.cpp:526
- object_error::parse_failed);
- }
----------------
sbc100 wrote:
> What happens if the linking metdata comes before the code section now? Is that OK?
The code section is not actually needed to check the linking metadata; only the Function, Global, and Import sections IIUC. So yes it's OK.
================
Comment at: llvm/test/tools/llvm-objdump/wasm/no-codesec.test:26
+ - Index: 0
+ Name: foo
----------------
sbc100 wrote:
> This is no longer a valid wasm file though right? Since it refers to a function that doesn't have a body. I guess that is maybe ok as long as we produce valid wasm files by default?
Correct; I think a function without a body would not validate. The use case for this is to have a wasm file with just debug info in it (e.g. to take a debug-info-containing wasm file and ship a stripped version, and archive the debug info separately).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128094/new/
https://reviews.llvm.org/D128094
More information about the llvm-commits
mailing list