|
1 | | -; Static code |
| 1 | +; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t_tags.o %p/Inputs/tags.s |
| 2 | + |
| 3 | +; Static code, with tags defined in tags.s |
2 | 4 | ; RUN: llc -filetype=obj -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling %p/Inputs/tag-section1.ll -o %t1.o |
3 | 5 | ; RUN: llc -filetype=obj -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling %p/Inputs/tag-section2.ll -o %t2.o |
4 | 6 | ; RUN: llc -filetype=obj -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling %s -o %t.o |
5 | | -; RUN: wasm-ld -o %t.wasm %t.o %t1.o %t2.o |
6 | | -; RUN: wasm-ld --export-all -o %t-export-all.wasm %t.o %t1.o %t2.o |
| 7 | +; RUN: wasm-ld -o %t.wasm %t.o %t1.o %t2.o %t_tags.o |
| 8 | +; RUN: wasm-ld --export-all -o %t-export-all.wasm %t.o %t1.o %t2.o %t_tags.o |
7 | 9 | ; RUN: obj2yaml %t.wasm | FileCheck %s --check-prefix=NOPIC |
8 | 10 | ; RUN: obj2yaml %t-export-all.wasm | FileCheck %s --check-prefix=NOPIC-EXPORT-ALL |
9 | 11 |
|
10 | | -; PIC code |
| 12 | +; PIC code with tags imported |
11 | 13 | ; RUN: llc -filetype=obj -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling -relocation-model=pic %p/Inputs/tag-section1.ll -o %t1.o |
12 | 14 | ; RUN: llc -filetype=obj -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling -relocation-model=pic %p/Inputs/tag-section2.ll -o %t2.o |
13 | 15 | ; RUN: llc -filetype=obj -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling -relocation-model=pic %s -o %t.o |
14 | | -; RUN: wasm-ld --import-undefined --experimental-pic --unresolved-symbols=import-dynamic -pie -o %t.wasm %t.o %t1.o %t2.o |
15 | | -; RUN: obj2yaml %t.wasm | FileCheck %s --check-prefix=PIC |
| 16 | +; RUN: wasm-ld --import-undefined --experimental-pic --unresolved-symbols=import-dynamic -pie -o %t_pic.wasm %t.o %t1.o %t2.o |
| 17 | +; RUN: obj2yaml %t_pic.wasm | FileCheck %s --check-prefix=PIC |
16 | 18 |
|
17 | 19 | target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" |
18 | 20 | target triple = "wasm32-unknown-emscripten" |
@@ -49,7 +51,7 @@ define void @_start() { |
49 | 51 | ; NOPIC-EXPORT-ALL: Kind: TAG |
50 | 52 | ; NOPIC-EXPORT-ALL: Index: 0 |
51 | 53 |
|
52 | | -; In PIC mode, tags are undefined and imported from JS. |
| 54 | +; In PIC mode, we leave the tags as undefined and they should be imported |
53 | 55 | ; PIC: Sections: |
54 | 56 | ; PIC: - Type: TYPE |
55 | 57 | ; PIC-NEXT: Signatures: |
|
0 commit comments