[llvm] [WebAssembly] Support multiple `.init_array` fragments when writing Wasm objects (PR #111008)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 15:55:43 PST 2024


sbc100 wrote:

> Unfortunately, I'm not sure how to express this in WebAssembly text format directly. There is an open issue suggesting it is not currently possible to define custom section content ([WebAssembly/design#1153](https://github.com/WebAssembly/design/issues/1153)) in the text format. I'm also not entirely sure how I would express the test, since the bug occurs in the code that converts the `.init_array` pointers into the format required for the custom `linking` section. Writing the custom `linking` section manually would skip that.

I think thinking you could convert the `.ll` file to `.s`?  Could you not express the `.init_array` sections in the `.s` format?  

I think you can get a starting point using `../llvm-build/bin/llc -o - xxx.ll  -asm-verbose=0`

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


More information about the llvm-commits mailing list