[all-commits] [llvm/llvm-project] 19cedd: [lld][WebAssembly] Fix for string merging + negati...

Sam Clegg via All-commits all-commits at lists.llvm.org
Tue May 11 17:50:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19cedd3cd3ab2144f7e477bb90d5f7ba8e500abb
      https://github.com/llvm/llvm-project/commit/19cedd3cd3ab2144f7e477bb90d5f7ba8e500abb
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2021-05-11 (Tue, 11 May 2021)

  Changed paths:
    M lld/test/wasm/merge-string.s
    M lld/wasm/InputFiles.cpp
    M lld/wasm/Symbols.cpp
    M lld/wasm/Symbols.h

  Log Message:
  -----------
  [lld][WebAssembly] Fix for string merging + negative addends

Don't include the relocation addend when calculating the
virtual address of a symbol.  Instead just pass the symbol's
offset and add the addend afterwards.

Without this fix we hit the `offset is outside the section`
error in MergeInputSegment::getSegmentPiece.

This fixes a real world error we were are seeing in emscripten.

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




More information about the All-commits mailing list