This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use section index in relocation section header
ClosedPublic

Authored by sbc100 on Apr 23 2018, 12:23 PM.

Details

Summary

Rather than referring to sections my their code, use the
absolute index of the target section within the module.

This is non-backwards compatible change to the linking format.

See https://github.com/WebAssembly/tool-conventions/issues/52

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Apr 23 2018, 12:23 PM
sbc100 updated this revision to Diff 143662.Apr 23 2018, 3:16 PM
  • cleanup
  • regenerate test inputs
sbc100 edited the summary of this revision. (Show Details)Apr 23 2018, 3:28 PM
sbc100 added reviewers: yurydelendik, ncw.

lld-side change is one-liner: https://reviews.llvm.org/D45795

Looks good to me. Does it make sense to check/assert in parseRelocSection what type of section is referred to -- just to ensure we are dealing with CODE and DATA sections (while we have multiple reloc section formats in the wild)?

ncw accepted this revision.Apr 24 2018, 10:37 AM

Looks good :)

This revision is now accepted and ready to land.Apr 24 2018, 10:37 AM
This revision was automatically updated to reflect the committed changes.