[PATCH] D95420: Revert "[WebAssembly] MC layer writes table symbols to object files"

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 04:18:10 PST 2021


sbc100 added a comment.

In D95420#2522285 <https://reviews.llvm.org/D95420#2522285>, @wingo wrote:

> @sbc100 @tlively what is the relationship between wasm-ld versions and compiler versions?  Surely it's not that any LD should accept anything from any compiler, right?

In general, we should strive to avoid breaking changes to object file format.  There can be cases when object files built with a LLVM version X and consumed by LLVM version Y.  For example a pre-built library (i.e. libMyGameEngine.a) which is distributed in binary form.   Ideally that library should be re-usable across as many LLVM versions as possible.

Occasionally this is not possible.   A couple of examples might be:

1. Use of a new feature of wasm that requires new types of symbol/relocation (e.g. ref types)
2. We decide to change the object format metadata layout (e.g. redesign the symbol table)

(1) breaks any object file that opts into using the new features but should not break object thats don't
(2) breaks *all* objects files and we really want to avoid that if we can.   This is when we would bump the object file version number

In think what happened with this change is we probably should have done (1) but we inadvertently did (2).   At least that is how I see it.  @tlively would you agree?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95420/new/

https://reviews.llvm.org/D95420



More information about the llvm-commits mailing list