WebAssembly / WebAssembly/wasi-libc
Generation user-defined custom section
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1k
- Forks
- 251
- Avg merge
- 7h 15m
- Merged PRs (30d)
- 3
Description
(this probably doesn't belong here, but I couldn't find better repo to raise it on)
Are there any example of generation user-defined custom sections? I tried smth like this
const unsigned char __FCE_SDK_VERSION[]
__attribute__((__section__(".custom_section.__fce_sdk_version")))
= "0.5.0";
but resulted Wasm binary doesn't contain new custom section with this name. I tried both with --no-gc-sections. Then checked emitted llvm that didn't contain wasm.custom_sections attribute.
I also checked llvm/clang source (and corresponding code inside rustc) and it seems that this isn't implemented in the clang frontend.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the clang frontend and the llvm/clang source for how section attributes and the wasm.custom_sections attribute are handled, then compare with the corresponding rustc code mentioned in the report. Done would require an agreed supported path or documented example that produces the requested named custom section in the Wasm binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100