WebAssembly / WebAssembly/wabt
[wasm-objdump] File offset for relocation of custom sections is wrong
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
It seems the section_starts_ is shared for all custom sections, so it ends up being overwritten if there are multiple custom sections in the binary. It probably should be changed to use the section index instead of the section code. @sbc100
Contributor guide
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 in wasm-objdump's handling of custom-section relocations and trace how section_starts_ is populated and read. Verify with a binary containing multiple custom sections that each relocation reports the correct file offset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- cli, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100