[PATCH] D96453: [lld][WebAssembly] Delay the merging of section when dynamic linking

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 14:25:09 PST 2021


sbc100 created this revision.
Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, dschuff.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

With dynamic linking we have the current limitation that there can be
only a single active data segment (since we use __memory_base as the
load address and we can't do arithemtic in constant expresions).

This change delays the merging of active segments until a little later
in the linking process which means that the grouping of data by section,
and the magic __start/__end symbols work as expected under dynamic
linking.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96453

Files:
  lld/test/wasm/data-segments.ll
  lld/test/wasm/tls-no-shared.s
  lld/wasm/InputChunks.cpp
  lld/wasm/InputChunks.h
  lld/wasm/MapFile.cpp
  lld/wasm/OutputSegment.h
  lld/wasm/Symbols.cpp
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96453.322825.patch
Type: text/x-patch
Size: 10712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210210/f60bd1a2/attachment.bin>


More information about the llvm-commits mailing list