[all-commits] [llvm/llvm-project] 465e0b: [lld][WebAssebmly] Ensure stub symbols always get ...

Sam Clegg via All-commits all-commits at lists.llvm.org
Tue Nov 24 08:20:20 PST 2020


  Branch: refs/heads/fix_stub_handling
  Home:   https://github.com/llvm/llvm-project
  Commit: 465e0bf415e1449919ec2f62027dc5df0ebc338d
      https://github.com/llvm/llvm-project/commit/465e0bf415e1449919ec2f62027dc5df0ebc338d
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2020-11-24 (Tue, 24 Nov 2020)

  Changed paths:
    A lld/test/wasm/weak-undefined-pic.s
    M lld/wasm/MarkLive.cpp
    M lld/wasm/Relocations.cpp
    M lld/wasm/SymbolTable.cpp
    M lld/wasm/Symbols.h
    M lld/wasm/SyntheticSections.cpp

  Log Message:
  -----------
  [lld][WebAssebmly] Ensure stub symbols always get address 0

Without this extra flag we can't distingish between stub functions and
functions that happen to have address 0 (relative to __table_base).

Adding this flag bit the base symbol class actually avoids growing the
SymbolUnion struct which would not be true if we added it to the
FunctionSymbol subclass (due to bitbacking).

The previous approach of setting it's table index to zero worked for
normal static relocations but not for `-fPIC` code.

See https://github.com/emscripten-core/emscripten/issues/12819




More information about the All-commits mailing list