WebAssembly / tool-conventions

Conventions supporting interoperatibility between tools working with WebAssembly.
Artistic License 2.0
298 stars 65 forks source link

Update file to reflect current defined relocations in ecosystem #147

Closed pmatos closed 3 years ago

pmatos commented 3 years ago

Include information about clang/LLVM versions where each relocation is implemented.

pmatos commented 3 years ago

Looking to get comments on the updates. I included some relocation 20 which has not been implemented in clang/LLVM yet but are working on it. So I included a note below the relocation list explaining which clang/LLVM versions contain which relocations.

wingo commented 3 years ago

LGTM, for what it's worth. Style nit, I would put suffixes like "(Since LLVM 10.x)" on the relocs added since LLVM 10.x (and 11.x, and presumably 12.x); otherwise with the summary below, it's easy to miss.

sbc100 commented 3 years ago

Including the 64-bit relocations in this document seems ok to me. +1 to adding warnings/footnotes that the 64-bit relocations aren't yet stable.

I assume you would still prefer not to include the REL relocations used for PIC code?

pmatos commented 3 years ago

Thanks for the reviews - I will prepare the necessary changes, commit then and re-request reviews.

sunfishcode commented 3 years ago

I assume you would still prefer not to include the REL relocations used for PIC code?

Yep. As @aardappel says, wasm64 seems unlikely to see big changes, and it's similar enough to wasm32 that keeping them together will make it easier to keep them in sync. But I'm expecting PIC and dynamic linking will see big changes in the future.

pmatos commented 3 years ago

Most of the changes have been completed, re-requesting reviews.

pmatos commented 3 years ago

Regarding the renaming suggested by @sunfishcode , I can do them under this PR if needed but it will require changes to LLVM and wabt and therefore invalidate the versions from which the relocs were available, although I can mention old names as well.

How do you prefer to do this?

sbc100 commented 3 years ago

I think we can land this as is and do the rename a followup since it will effect all relocation names.

pmatos commented 3 years ago

I think we can land this as is and do the rename a followup since it will effect all relocation names.

Sure!

pmatos commented 3 years ago

I have squashed the changes. If all is OK, feel free to merge.