[PATCH] D42095: [WebAssembly] Symbol changes #3: Cosmetic table, LLVM. NFC.

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 03:16:11 PST 2018


ncw created this revision.
ncw added a reviewer: sbc100.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb.

Third chunk split out of https://reviews.llvm.org/D41954.

No need to commit simultaneously with the matching LLD change (DXXX), they are completely independent.

No functional changes.

Changes:

- The previous patch #2 changed it so that the ELEMS section is now completely unused in relocatable Wasm files.
- We can therefore change its contents without any compatibility worries.
- We previously wrote out the table with offset zero in Clang, and offset 1/0 in LLD depending on whether the Wasm file was relocatable. The symbol resolution rules are different in Clang and LLD as well.
- For uniformity, we should just write out the same ELEMS section everywhere. This follows the existing principle that Wasm object files are written out with the "provisional" value of relocations applied already: the Wasm object file should look the same as Wasm file that the linker will output.


Repository:
  rL LLVM

https://reviews.llvm.org/D42095

Files:
  lib/MC/WasmObjectWriter.cpp
  test/MC/WebAssembly/external-func-address.ll
  test/MC/WebAssembly/global-ctor-dtor.ll
  test/MC/WebAssembly/weak-alias.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42095.129927.patch
Type: text/x-patch
Size: 8770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180116/d5013c11/attachment.bin>


More information about the llvm-commits mailing list