This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Improve support for linker synthetic symbols. NFC
ClosedPublic

Authored by sbc100 on Dec 5 2017, 10:17 AM.

Details

Summary

This is part of larger change to add synthetic symbols
for section start/end points and init/fini_array:
https://reviews.llvm.org/D40760

Allows synthetic global symbol to have explicily set
their virtual address.

Event Timeline

sbc100 created this revision.Dec 5 2017, 10:17 AM
sbc100 edited the summary of this revision. (Show Details)Dec 5 2017, 10:17 AM
sbc100 edited the summary of this revision. (Show Details)
sbc100 retitled this revision from [WebAssembly] Improve support linker synthetic symbols to [WebAssembly] Improve support linker synthetic symbols. NFC.
sbc100 added a subscriber: llvm-commits.
sbc100 retitled this revision from [WebAssembly] Improve support linker synthetic symbols. NFC to [WebAssembly] Improve support for linker synthetic symbols. NFC.Dec 5 2017, 10:19 AM
sbc100 added a reviewer: ruiu.
ruiu added inline comments.Dec 5 2017, 10:30 AM
wasm/Driver.cpp
282

Does it make sense to return its return value to Config->StackPointer so that we don't have to look it up again in Writer?

sbc100 added a subscriber: ncw.Dec 5 2017, 10:31 AM
sbc100 updated this revision to Diff 125572.Dec 5 2017, 10:32 AM
  • define kStackPointer inside namespace
sbc100 updated this revision to Diff 125573.Dec 5 2017, 10:37 AM
  • Review feedback
ruiu accepted this revision.Dec 5 2017, 10:41 AM

LGTM

wasm/WriterUtils.h
33

In lld, if a constant appears only once in the driver, we write it in place instead of defining a constant.

This revision is now accepted and ready to land.Dec 5 2017, 10:41 AM
sbc100 updated this revision to Diff 125579.Dec 5 2017, 11:02 AM
  • Inline kStackPointer
This revision was automatically updated to reflect the committed changes.