This is an archive of the discontinued LLVM Phabricator instance.

[WebAssebmly] Remove reloc ordering constraint
ClosedPublic

Authored by sbc100 on Mar 5 2018, 11:13 PM.

Details

Summary

The MC layer doesn't currently emit relocations in offset
order for the entire code section so this check was causing
failures on the wasm waterfall.

Perhaps we can re-instate this check if we devide the relocations
per-function, or add extra ordering the MC object writer.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Mar 5 2018, 11:13 PM
sbc100 updated this revision to Diff 137131.Mar 5 2018, 11:14 PM
  • debugging
sbc100 added a reviewer: ncw.Mar 5 2018, 11:14 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 5 2018, 11:17 PM
This revision was automatically updated to reflect the committed changes.
ncw added a comment.Mar 6 2018, 1:19 AM

Oops, thanks very much!

It was passing for all the checked-in tests, so I guess there's a test missing then. Do you have an example of what input file creates out-of-order relocs?

On the waterfall it was happening in libc++abi.a. The example I found was cxa_vector.cpp.o. I did think about trying to generate a new test for this case, but decided not to prioritize it. I'll attache that object file. If you fancy coming up with a minimal reproducer that would be welcome new test. I imagine we might be able to re-enforce this once we switch to per-function and per-segment relocs.

ncw added a comment.Mar 6 2018, 2:22 PM

Thanks, I'll have a quick look out of curiosity and see if I can work out how the relocs are appearing out of order (it may affect your work to group the relocs, since you'll need to "chunk" them into per-segment batches which is similar to getting them ordered).