[all-commits] [llvm/llvm-project] baff8e: [WebAssembly][lld] Fix for static linking of PIC code

Sam Clegg via All-commits all-commits at lists.llvm.org
Tue Oct 29 19:32:41 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: baff8ec2e1d845d90580a0d85ad6ab43d929bcfe
      https://github.com/llvm/llvm-project/commit/baff8ec2e1d845d90580a0d85ad6ab43d929bcfe
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2019-10-29 (Tue, 29 Oct 2019)

  Changed paths:
    M lld/test/wasm/pic-static.ll
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [WebAssembly][lld] Fix for static linking of PIC code

When statically linking PIC code we create an internalized __memory_base
so that memory-base-relative relocation work correctly.  The value of
this global should be zero, and not the globalBase since the globalBase
offset is already taken into account by getVirtualAddress.

Fixes: https://github.com/emscripten-core/emscripten/issues/9013

Differential Revision: https://reviews.llvm.org/D69600




More information about the All-commits mailing list