aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-12-01 14:04:21 -0800
committerSam Clegg <sbc@chromium.org>2020-12-01 14:53:59 -0800
commita38ed62ea803a41c2e1f3fa12edbc176e474056f (patch)
tree2b116c60e9d3b5862e555f9816c0495730b2bce3
parent[libc++abi] Don't try calling __libcpp_aligned_free when aligned allocation i... (diff)
downloadllvm-project-a38ed62ea803a41c2e1f3fa12edbc176e474056f.tar.gz
llvm-project-a38ed62ea803a41c2e1f3fa12edbc176e474056f.tar.bz2
llvm-project-a38ed62ea803a41c2e1f3fa12edbc176e474056f.zip
[lld][WebAssembly] Feedback from D92038. NFC
Differential Revision: https://reviews.llvm.org/D92429
-rw-r--r--lld/test/wasm/weak-undefined-pic.s4
-rw-r--r--lld/wasm/Symbols.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/lld/test/wasm/weak-undefined-pic.s b/lld/test/wasm/weak-undefined-pic.s
index c12ef235d85f..a169fd315f08 100644
--- a/lld/test/wasm/weak-undefined-pic.s
+++ b/lld/test/wasm/weak-undefined-pic.s
@@ -27,7 +27,7 @@ _start:
.weak foo
.functype foo () -> (i32)
-# Verify that we do not generate dynamnic relocations for the GOT entry.
+# Verify that we do not generate dynamic relocations for the GOT entry.
# CHECK-NOT: __wasm_apply_relocs
@@ -68,7 +68,7 @@ _start:
# CHECK-NEXT: - Index: 1
# CHECK-NEXT: Name: 'undefined_weak:foo'
-# With `-pie` or `-shared` the resolution should is defered to the dynamic
+# With `-pie` or `-shared` the resolution should be deferred to the dynamic
# linker and the function address should be imported as GOT.func.foo.
#
# RUN: wasm-ld --experimental-pic -pie %t.o -o %t3.wasm
diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h
index 90fb5194edcd..cfa686998de4 100644
--- a/lld/wasm/Symbols.h
+++ b/lld/wasm/Symbols.h
@@ -160,6 +160,9 @@ public:
// True if this symbol is a linker-synthesized stub function (traps when
// called) and should otherwise be treated as missing/undefined. See
// SymbolTable::replaceWithUndefined.
+ // These stubs never appear in the table and any table index relocations
+ // against them will produce address 0 (The table index representing
+ // the null function pointer).
bool isStub : 1;
uint32_t flags;