WebAssembly / WebAssembly/tool-conventions

Should we make relocations specific to data segments and individual functions

Open
#32 8 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

By default in the toolchain we are running with -ffunction-sections and -fdata-sections. In order to achieve this the linker must be able to selectively include or exclude a given data segment or an individual function.

However, relocations are specified on the per-section basis, which means that figuring out which relocations apply to given segment or function is not easy (currently all relocations are scanned for each segment/function).

Rather than one reloc section per input section (i.e. reloc.CODE + reloc.DATA) should we include a reloc section for each segment/function. e.g. reloc.CODE.1, reloc.CODE.2, reloc.DATA.1, etc...

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 by reviewing the toolchain's current per-section relocation convention and how the linker scans relocations for data segments and individual functions. Compare that with the proposed per-segment and per-function relocation sections; done means reaching and documenting an agreed convention that supports selective inclusion and exclusion.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.