2020-05-21 12:35:18 +08:00
|
|
|
; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
|
2019-05-24 21:29:17 +08:00
|
|
|
; RUN: llc -filetype=obj -o %t.start.o %s
|
|
|
|
; RUN: wasm-ld -o %t.wasm %t.start.o %t.ret32.o -y ret32 -y _start | FileCheck %s -check-prefix=BOTH
|
|
|
|
; RUN: wasm-ld -o %t.wasm %t.ret32.o %t.start.o -y ret32 -y _start | FileCheck %s -check-prefix=REVERSED
|
2019-02-06 10:35:18 +08:00
|
|
|
|
|
|
|
; check alias
|
2019-05-24 21:29:17 +08:00
|
|
|
; RUN: wasm-ld -o %t.wasm %t.start.o %t.ret32.o -trace-symbol=_start | FileCheck %s -check-prefixes=JUST-START
|
2019-02-06 10:35:18 +08:00
|
|
|
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
|
|
|
|
declare i32 @ret32(float %arg)
|
|
|
|
|
|
|
|
define void @_start() {
|
|
|
|
entry:
|
|
|
|
%call1 = call i32 @ret32(float 0.0)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-05-24 21:29:17 +08:00
|
|
|
; BOTH: start.o: definition of _start
|
|
|
|
; BOTH-NEXT: start.o: reference to ret32
|
|
|
|
; BOTH-NEXT: ret32.o: definition of ret32
|
2019-02-06 10:35:18 +08:00
|
|
|
|
2019-05-24 21:29:17 +08:00
|
|
|
; REVERSED: ret32.o: definition of ret32
|
|
|
|
; REVERSED-NEXT: start.o: definition of _start
|
|
|
|
; REVERSED-NEXT: start.o: reference to ret32
|
|
|
|
|
|
|
|
; JUST-START: start.o: definition of _start
|
2019-02-06 10:35:18 +08:00
|
|
|
; JUST-START-NOT: ret32
|