[PATCH] D42081: [WebAssembly] Symbol changes #2: Table relocs, LLD

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 10:54:57 PST 2018


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

Second chunk split out of https://reviews.llvm.org/D41955.

Must be committed simultaneously with LLD change, https://reviews.llvm.org/D42080.

Changes:

- LLD updated to handle new table reloc data (see https://reviews.llvm.org/D42080)
- Now, we build the output table by iterating over all the non-Discarded Functions and Segments, rather than iterating over all the Symbols. This means that when we implement GC, the function table will actually be pruned properly.
- A small block of code in InputChunks::calcRelocations has been factored out into ObjFile::calcNewValue to match ObjFile::calcNewIndex.
- Relocatable output has been updated in the same way as for https://reviews.llvm.org/D42080, so the change to that test is correct


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42081

Files:
  test/wasm/relocatable.ll
  wasm/InputChunks.cpp
  wasm/InputChunks.h
  wasm/InputFiles.cpp
  wasm/InputFiles.h
  wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42081.129884.patch
Type: text/x-patch
Size: 8495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180115/a83b0a42/attachment-0001.bin>


More information about the llvm-commits mailing list