WebAssembly / WebAssembly/tool-conventions

Mention elemidx and dataidx in the Linking.md documentation

Open
#193 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
372
Forks
75
PR merge metrics
No merged PRs in 30d

Description

Hello,

I am writing a wasm backend for my compiler and I was planning to output relocatable wasm modules.

In the Linking.md document, there is no mention of dataidx and elemidx renumbering such that we would need to pad the LEB128 encodings of these to 5 bytes. I believe this should be new relocation types but these do not currently exist because LLVM does not support the element section or generate any memory.init or data.drop instruction.

I lost quite a bit of time wondering why the documentation did not address this issue. So here are my questions:

First, did I understood the problem properly and there is no mention of data or element segments reordering because these are not generated/supported by LLVM/lld?
Second, if this is correct, can I submit a PR updating the markdown documentation?

Thank you for your help. :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Linking.md and review the sections describing relocatable modules and index renumbering. Verify the questions about dataidx and elemidx against the documented WebAssembly conventions and LLVM/lld support mentioned in the issue. Done means resolving the ambiguity and updating the Markdown documentation if the omission is confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.