This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add extra test for weak global symbols
ClosedPublic

Authored by ncw on Dec 20 2017, 6:50 AM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

ncw created this revision.Dec 20 2017, 6:50 AM
ncw updated this revision to Diff 127719.Dec 20 2017, 7:17 AM

Oops, rebased to master than on top of my previous patches

sbc100 accepted this revision.Dec 20 2017, 4:57 PM

Nice. I wonder if we added --emit-reloc is might show more clearly which address is being loaded by the code section? Happy to land either way.

This revision is now accepted and ready to land.Dec 20 2017, 4:57 PM
ncw added a comment.Dec 21 2017, 2:56 AM

Since the relocation is emitted in the function body, which is tested, it should be good enough for now.

D41390 modifies this test (by discarding the duplicate InputSegment), at which point the test is even more precise. Until D41390 lands, this test doesn't need to be too precise since it's currently asserting "wrong" output (both copies of the weak functions and weak globals are there in the CODE/DATA sections).

I'd say it's fine to commit this as-is - we're revisiting it soon.

This revision was automatically updated to reflect the committed changes.