Lines Matching +full:- +full:- +full:ignore +full:- +full:-

1 # RUN: split-file %s %t
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %t/main.s -o %t/main.o
3 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %t/secondary.s -o %t/secondary.o
7 # RUN: not wasm-ld --no-gc-sections %t/main.o %t/secondary.o -o /dev/null 2>&1 | \
8 # RUN: FileCheck -check-prefix=ERRUND %s
12 ## report-all is the default one. Check that we get the same error
13 # RUN: not wasm-ld --no-gc-sections %t/main.o %t/secondary.o -o /dev/null --unresolved-symbols=report-all 2>&1 | \
14 # RUN: FileCheck -check-prefix=ERRUND %s
17 # RUN: not wasm-ld %t/main.o -o /dev/null --unresolved-symbols=xxx 2>&1 | \
18 # RUN: FileCheck -check-prefix=ERR1 %s
19 # ERR1: unknown --unresolved-symbols value: xxx
21 # RUN: not wasm-ld %t/main.o -o /dev/null --unresolved-symbols xxx 2>&1 | \
22 # RUN: FileCheck -check-prefix=ERR1 %s
24 ## Ignore all should not produce error and should not produce
27 # RUN: wasm-ld %t/main.o -o %t2.wasm --unresolved-symbols=ignore-all
28 # RUN: obj2yaml %t2.wasm | FileCheck -check-prefix=IGNORE %s
30 ## --warn-unresolved-symbols should behave the same
31 # RUN: wasm-ld %t/main.o -o %t2.wasm --warn-unresolved-symbols
32 # RUN: obj2yaml %t2.wasm | FileCheck -check-prefix=IGNORE %s
34 # IGNORE-NOT: - Type: IMPORT
35 # IGNORE-NOT: - Type: ELEM
37 # IGNORE: - Type: CODE
38 # IGNORE-NEXT: Functions:
39 # IGNORE-NEXT: - Index: 0
40 # IGNORE-NEXT: Locals: []
41 # IGNORE-NEXT: Body: 000B
42 # IGNORE-NEXT: - Index: 1
43 # IGNORE-NEXT: Locals: []
44 # IGNORE-NEXT: Body: 1080808080001082808080001083808080001A1A0B
45 # IGNORE-NEXT: - Index: 2
46 # IGNORE-NEXT: Locals: []
47 # IGNORE-NEXT: Body: 4180808080000F0B
48 # IGNORE-NEXT: - Index: 3
49 # IGNORE-NEXT: Locals: []
50 # IGNORE-NEXT: Body: 4180808080000F0B
52 # IGNORE: - Type: CUSTOM
53 # IGNORE-NEXT: Name: name
54 # IGNORE-NEXT: FunctionNames:
55 # IGNORE-NEXT: - Index: 0
56 # IGNORE-NEXT: Name: undefined
57 # IGNORE-NEXT: - Index: 1
58 # IGNORE-NEXT: Name: _start
59 # IGNORE-NEXT: - Index: 2
60 # IGNORE-NEXT: Name: get_data_addr
61 # IGNORE-NEXT: - Index: 3
62 # IGNORE-NEXT: Name: get_func_addr
64 ## --import-undefined should handle unresolved functions symbols
66 ## `--allow-undefined` should behave like `--import-undefined` +
67 ## `--unresolve-symbols=ignore`
68 # RUN: wasm-ld %t/main.o -o %t3.wasm --import-undefined --unresolved-symbols=ignore-all
69 # RUN: obj2yaml %t3.wasm | FileCheck -check-prefix=IMPORT %s
70 # IMPORT: - Type: IMPORT
71 # IMPORT-NEXT: Imports:
72 # IMPORT-NEXT: - Module: env
73 # IMPORT-NEXT: Field: undef_func
74 # IMPORT-NEXT: Kind: FUNCTION
75 # IMPORT-NEXT: SigIndex: 0
76 # IMPORT-NEXT: - Type: FUNCTION
78 ## Check that --import-undefined reports unresolved data symbols.
79 # RUN: not wasm-ld %t/main.o -o %t3.wasm --import-undefined --unresolved-symbols=report-all 2>&1 | FileCheck -check-prefix=IMPORTUNDEFINED %s
80 # IMPORTUNDEFINED-NOT: error: {{.*}}main.o: undefined symbol: undef_func
84 # RUN: wasm-ld -r %t/main.o -o %t4.wasm --unresolved-symbols=report-all
85 # RUN: llvm-readobj %t4.wasm > /dev/null 2>&1
87 ## import-dynamic should fail due to incompatible relocations.
88 # RUN: not wasm-ld %t/main.o -o %t5.wasm --experimental-pic --unresolved-symbols=import-dynamic 2>&1 | FileCheck -check-prefix=ERRNOPIC %s
89 # ERRNOPIC: relocation R_WASM_MEMORY_ADDR_SLEB cannot be used against symbol `undef_data`; recompile with -fPIC
90 # ERRNOPIC: relocation R_WASM_TABLE_INDEX_SLEB cannot be used against symbol `undef_func`; recompile with -fPIC
92 #--- main.s
94 .functype undef_func () -> ()
95 .functype get_data_addr () -> (i32)
96 .functype get_func_addr () -> (i32)
100 .functype _start () -> ()
110 .functype get_data_addr () -> (i32)
117 .functype get_func_addr () -> (i32)
122 #--- secondary.s
124 .functype undef_func () -> ()
127 .functype foo () -> ()