This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use function/global index space in WasmSymbol
ClosedPublic

Authored by sbc100 on Sep 22 2017, 2:15 PM.

Details

Summary

It is useful for the symbol to contain the index of the
function of global it represents in the function/global
index space.

For imports we also store the import index so that the
linker can find, for example, the signature of the
corresponding function, which is defined by the import

In the long run we need to decide whether this API
surface should be closer to binary (where imported
functions are seperate) or the wasm spec (where the
function index space is unified).

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Sep 22 2017, 2:15 PM
sbc100 added a subscriber: llvm-commits.
dschuff accepted this revision.Sep 26 2017, 9:18 AM

I think it probably makes sense to use the function/global index space for the compiler and linker, and user-oriented tools (e.g. objdump, nm). For things like obj2yaml or readobj, maybe a something more raw would be appropriate, but I'd guess that it's not a super-high priority, other than it's nice to have those for testing.

This revision is now accepted and ready to land.Sep 26 2017, 9:18 AM

oh also it looks like you left a couple of words out of the first paragraph of the commit message.

sbc100 edited the summary of this revision. (Show Details)Sep 26 2017, 11:21 AM
This revision was automatically updated to reflect the committed changes.