File: shared-needed.s

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,999,584 kB
  • sloc: cpp: 6,951,724; ansic: 1,486,157; asm: 913,598; python: 232,059; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,079; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,430; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (54 lines) | stat: -rw-r--r-- 1,519 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o

# RUN: wasm-ld -shared --experimental-pic -o %t.ret32.so %t.ret32.o
# RUN: obj2yaml %t.ret32.so | FileCheck %s -check-prefix=SO1

# Without linking against the ret32.so shared object we expect an undefined
# symbol error

# RUN: not wasm-ld -shared --experimental-pic -o %t.so %t.o 2>&1 | FileCheck %s --check-prefix=ERROR
# ERROR: undefined symbol: ret32

# RUN: wasm-ld -shared --experimental-pic -o %t.so %t.o %t.ret32.so
# RUN: obj2yaml %t.so | FileCheck %s -check-prefix=SO2


.globl foo
.globl data

.functype ret32 (f32) -> (i32)

foo:
  .functype foo (f32) -> (i32)
  local.get 0
  call ret32
  end_function

.section .data,"",@
data:
 .p2align 2
 .int32 0
 .size data,4


# SO1:      Sections:
# SO1-NEXT:   - Type:            CUSTOM
# SO1-NEXT:     Name:            dylink.0
# SO1-NEXT:     MemorySize:      0
# SO1-NEXT:     MemoryAlignment: 0
# SO1-NEXT:     TableSize:       0
# SO1-NEXT:     TableAlignment:  0
# SO1-NEXT:     Needed:          []
# SO1-NEXT:   - Type:            TYPE

# SO2:      Sections:
# SO2-NEXT:   - Type:            CUSTOM
# SO2-NEXT:     Name:            dylink.0
# SO2-NEXT:     MemorySize:      4
# SO2-NEXT:     MemoryAlignment: 2
# SO2-NEXT:     TableSize:       0
# SO2-NEXT:     TableAlignment:  0
# SO2-NEXT:     Needed:
# SO2-NEXT:       - shared-needed.s.tmp.ret32.so
# SO2-NEXT:   - Type:            TYPE