llvm-project/lld/test/wasm
Sam Clegg c468dc1b12 [lld][WebAssembly] Handle weakly defined symbols in shared libraries.
In the case of weakly defined symbols in shared libraries we now
generate both an import and an export.  The dynamic linker can then
choose how a winner from among all the shared libraries that define a
given symbol.

Previously any direct usage of a weakly defined symbol would use the
DSO-local definition (For example, even through there would be single
address for a weakly defined function, each DSO could end up directly
calling its local version).

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

Differential Revision: https://reviews.llvm.org/D108413
2021-08-19 19:25:49 -04:00
..
Inputs [lld][WebAssembly] Align __heap_base 2021-07-24 14:03:26 +02:00
lto [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
alias.s [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
archive-export.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
archive-no-index.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
archive-weak-undefined.ll [lld][WebAssembly] Implement --unresolved-symbols 2020-11-17 16:27:06 -08:00
archive.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
bss-only.s [lld][WebAssembly] Don't emit names for data segments that we omit 2020-12-09 20:59:26 -08:00
bsymbolic.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
call-indirect.ll [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
check-arch-32-in-64.test [WebAssembly] Improved LLD error messages in case of mixed wasm32/wasm64 object files 2020-10-29 17:15:59 -07:00
check-arch-64-in-32.test [WebAssembly] Improved LLD error messages in case of mixed wasm32/wasm64 object files 2020-10-29 17:15:59 -07:00
comdat-sections.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
comdats.ll
command-exports-no-tors.s [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
command-exports.s [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
compress-relocs.ll [WebAssembly] call_indirect issues table number relocs 2021-03-01 16:49:00 +01:00
conflict.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
corrupted.wasm.test [Object][WebAssembly] Update format of error messages 2021-01-25 21:12:53 -08:00
ctor-gc-setup.test [WebAssembly] GC constructor functions in otherwise unused archive objects 2020-10-12 18:54:57 -07:00
ctor-gc.test [lld][WebAssembly] Don't GC library objects under `--whole-archive` 2020-10-12 21:19:19 -07:00
ctor-no-gc.test [WebAssembly] GC constructor functions in otherwise unused archive objects 2020-10-12 18:54:57 -07:00
ctor_return_value.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
custom-section-name.ll [WebAssembly] Elide data segments for .bss sections 2019-10-15 19:05:11 +00:00
custom-sections.ll
data-layout.s [WebAssembly] Fix PIC/GOT codegen for wasm64 2021-05-20 09:59:31 -07:00
data-segment-merging.ll [lld][WebAssembly] Delay creation of internal __wasm_memory_init function 2020-12-10 10:47:18 -08:00
data-segments.ll [WebAssembly] Fixed LLD generation of 64-bit __wasm_init_memory 2021-07-12 15:26:11 -07:00
debug-removed-fn.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
debuginfo-undefined-global.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
debuginfo.test [WebAssembly] Fixed byval args missing DWARF DW_AT_LOCATION 2021-01-07 10:31:38 -08:00
demangle.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
driver.ll [lld][WebAssembly] Do not require --shared-memory with --relocatable 2020-04-14 13:49:28 -07:00
duplicate-function-imports.s Reland: "[WebAssembly] Deduplicate imports of the same module name, field name, and type" 2021-07-22 14:16:05 -07:00
duplicate-global-imports.s Reland: "[WebAssembly] Deduplicate imports of the same module name, field name, and type" 2021-07-22 14:16:05 -07:00
duplicate-table-imports.s Reland: "[WebAssembly] Deduplicate imports of the same module name, field name, and type" 2021-07-22 14:16:05 -07:00
early-exit-for-bad-paths.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
emit-relocs-fpic.s [lld][WebAssembly] Error on import/export of mutable global without `mutable-globals` feature 2020-09-12 14:28:14 -07:00
emit-relocs.ll Reland "[lib/Support/YAMLTraits] - Don't print leading zeroes when dumping Hex8/Hex16/Hex32 types." (https://reviews.llvm.org/D90930). 2020-11-18 13:08:46 +03:00
entry-signature.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
entry.ll
export-all.ll
export-all.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
export-empty.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
export-if-defined.s [lld][WebAssembly] Add `--export-if-defined` 2021-04-29 10:58:45 -07:00
export-name.ll [WebAssembly] Support wasm exports with zero-length names. 2020-03-26 16:20:43 -07:00
export-optional-lazy.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
export-optional.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
export-table-explicit.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
export-table.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
export.s [lld][WebAssembly] Rewrite exports test in assembly. NFC 2021-04-05 11:14:12 -07:00
externref.s [WebAssembly] Add support for externalref to MC and wasm-ld 2020-06-22 15:57:24 -07:00
fatal-warnings.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
function-imports-first.ll [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
function-imports.ll [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
function-index.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
gc-imports.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
gc-sections.ll [WebAssembly] Add support for named data sections in wasm binaries 2020-12-09 12:57:07 -08:00
global-base.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
globals.s Fix typo from https://reviews.llvm.org/D101399 2021-04-28 11:31:16 -07:00
growable-table.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
import-attribute-mismatch.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
import-memory.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
import-module.ll
import-name.ll [lld][WebAssembly] Allow symbols with explict import names to be undefined at link time. 2020-02-19 18:02:49 -08:00
import-table.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
init-fini-no-gc.ll [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
init-fini.ll [WebAssembly] Add support for table linking to wasm-ld 2021-01-18 16:57:18 +01:00
invalid-mvp-table-use.s [WebAssembly][lld] Preassign table number 0 to indirect function table for MVP inputs 2021-02-12 20:20:19 +01:00
invalid-stack-size.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
large-memory.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
lit.local.cfg
load-undefined.test [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
local-symbols.ll [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
locals-duplicate.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
many-functions.ll Reland "[lib/Support/YAMLTraits] - Don't print leading zeroes when dumping Hex8/Hex16/Hex32 types." (https://reviews.llvm.org/D90930). 2020-11-18 13:08:46 +03:00
map-file.s [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections 2021-07-19 14:02:33 -07:00
merge-string-debug.s [lld][WebAssemlby] Fix for string merging of -dwarf-5 sections 2021-06-01 14:33:56 -07:00
merge-string.s [lld][WebAssembly] Allow data symbols to extend past end of segment 2021-05-12 13:43:37 -07:00
multi-table.s [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
multivalue-return-func-types.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
mutable-global-exports.s [lld][WebAssembly] Allow exporting of mutable globals 2020-09-30 17:53:27 -07:00
mutable-globals.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
name-section-mangling.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
no-tls.s [lld][WebAssembly] Delay creation of internal __wasm_memory_init function 2020-12-10 10:47:18 -08:00
optional-symbol.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
pic-static.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
pie.ll [lld][WebAssembly] Fix crash with `-pie` without `--allow-undefined` 2021-05-03 18:04:55 -07:00
reloc-addend.s [lld][WebAssembly] Remove relocation target verification 2021-05-11 12:05:14 -07:00
reloc-relative.s [WebAssembly] Add new relocation for location relative data 2021-03-08 11:34:10 -08:00
relocatable-comdat.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
relocatable-options.test [lld][WebAssembly] Fix resolveIndirectFunctionTable for relocatable output 2021-02-18 09:33:54 +01:00
relocatable.ll [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
relocation-bad-tls.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
reproduce.ll
responsefile.test [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
section-symbol-relocs.yaml [WebAssembly] Add support for table linking to wasm-ld 2021-01-18 16:57:18 +01:00
shared-export-dynamic.s [lld][WebAssembly] Convert more tests to asm format. NFC 2021-05-03 17:16:31 -07:00
shared-memory-no-atomics.yaml [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
shared-memory.yaml [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
shared-needed.s [lld][WebAssembly] Convert more tests to asm format. NFC 2021-05-03 17:16:31 -07:00
shared-weak-symbols.s [lld][WebAssembly] Handle weakly defined symbols in shared libraries. 2021-08-19 19:25:49 -04:00
shared.s [WebAssembly] Avoid unused function imports in PIC mode 2021-08-18 22:31:04 -04:00
shared64.s [WebAssembly] Avoid unused function imports in PIC mode 2021-08-18 22:31:04 -04:00
signature-mismatch-export.ll [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
signature-mismatch-relocatable.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
signature-mismatch-unknown.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
signature-mismatch-weak.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
signature-mismatch.s [WebAssembly][lld] Convert signature-mismatch.ll test to asm. NFC 2021-08-18 22:17:02 -04:00
stack-first.test [lld][WebAssembly] Align __heap_base 2021-07-24 14:03:26 +02:00
stack-pointer.ll [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
startstop.ll [lld][WebAssembly] Prefer objdump -d over obj2yaml for tests. NFC 2021-08-10 18:17:58 -04:00
strip-all.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
strip-debug.test [lld][WebAssembly] Do not remove name section with --strip-debug 2021-07-26 11:06:52 -07:00
symbol-type-mismatch.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
tag-section.ll [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
target-feature-disallowed.yaml [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
target-feature-none.yaml [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
target-feature-required.yaml [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
target-feature-used.yaml [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
threads.s [lld][COFF][ELF][WebAssembly] Replace --[no-]threads /threads[:no] with --threads={1,2,...} /threads:{1,2,...} 2020-03-31 08:46:12 -07:00
tls-align.s [lld][WebAssembly] Convert TLS tests to asm format 2020-11-10 11:38:53 -08:00
tls-export.s [lld][WebAssembly] Disallow exporting of TLS symbols 2021-05-10 09:58:44 -07:00
tls-import.s [lld][WebAssembly] Error on import of TLS symbols in shared libraries 2021-07-20 12:36:03 -07:00
tls-non-shared-memory.s [lld][WebAssembly] Fix for PIC output + TLS + non-shared-memory 2021-05-21 15:16:47 -07:00
tls.s [WebAssembly] Add TLS data segment flag: WASM_SEG_FLAG_TLS 2021-05-12 13:31:02 -07:00
trace-symbol.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
trace.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
undefined-data.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
undefined-entry.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
undefined-weak-call.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
undefined.ll
unresolved-symbols.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
version.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
visibility-hidden.ll [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
weak-alias-overide.ll [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
weak-alias.ll [WebAssembly] Rename WasmLimits::Initial to ::Minimum. NFC. 2021-03-24 09:10:11 +01:00
weak-and-strong-undef.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
weak-symbols.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
weak-undefined-pic.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
weak-undefined.s [lld][WebAssembly] Do not remove name section with --strip-debug 2021-07-26 11:06:52 -07:00
whole-archive.test [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
wrap.ll Reland "[lib/Support/YAMLTraits] - Don't print leading zeroes when dumping Hex8/Hex16/Hex32 types." (https://reviews.llvm.org/D90930). 2020-11-18 13:08:46 +03:00