[all-commits] [llvm/llvm-project] 808fcd: [lld][WebAssembly] Fix crash with `-pie` without `...

Sam Clegg via All-commits all-commits at lists.llvm.org
Mon May 3 18:05:38 PDT 2021


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

  Changed paths:
    M lld/test/wasm/pie.ll
    M lld/wasm/Relocations.cpp
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Fix crash with `-pie` without `--allow-undefined`

`shouldImport` was not returning true in PIC mode even though out
assumption elsewhere (in Relocations.cpp:scanRelocations) is that we
don't report undefined symbols in PIC mode today.  This was resulting
functions that were undefined and but also not imported which hits an
assert later on that all functions have valid indexes.

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




More information about the All-commits mailing list