2018-01-24 11:29:47 +08:00
|
|
|
; RUN: llc -filetype=obj -o %t.o %s
|
2018-09-28 05:06:25 +08:00
|
|
|
; RUN: wasm-ld --export=start_alias %t.o -o %t.wasm
|
2018-01-13 01:56:15 +08:00
|
|
|
; RUN: obj2yaml %t.wasm | FileCheck %s
|
|
|
|
|
2018-05-11 01:59:41 +08:00
|
|
|
target triple = "wasm32-unknown-unknown"
|
2018-01-24 11:29:47 +08:00
|
|
|
|
2018-02-02 08:30:03 +08:00
|
|
|
@start_alias = alias void (), void ()* @_start
|
2018-01-13 01:56:15 +08:00
|
|
|
|
|
|
|
; Function Attrs: nounwind uwtable
|
2018-02-02 08:30:03 +08:00
|
|
|
define void @_start() local_unnamed_addr #1 {
|
2018-01-13 01:56:15 +08:00
|
|
|
entry:
|
2018-02-02 08:30:03 +08:00
|
|
|
ret void
|
2018-01-13 01:56:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK: --- !WASM
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: FileHeader:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: Version: 0x00000001
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Sections:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Type: TYPE
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Signatures:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Index: 0
|
2018-02-02 08:30:03 +08:00
|
|
|
; CHECK-NEXT: ReturnType: NORESULT
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: ParamTypes:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Type: FUNCTION
|
2019-03-02 06:35:47 +08:00
|
|
|
; CHECK-NEXT: FunctionTypes: [ 0 ]
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Type: TABLE
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Tables:
|
2019-01-08 14:25:55 +08:00
|
|
|
; CHECK-NEXT: - ElemType: FUNCREF
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Limits:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: Flags: [ HAS_MAX ]
|
|
|
|
; CHECK-NEXT: Initial: 0x00000001
|
|
|
|
; CHECK-NEXT: Maximum: 0x00000001
|
|
|
|
; CHECK-NEXT: - Type: MEMORY
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Memories:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Initial: 0x00000002
|
|
|
|
; CHECK-NEXT: - Type: GLOBAL
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Globals:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Index: 0
|
|
|
|
; CHECK-NEXT: Type: I32
|
|
|
|
; CHECK-NEXT: Mutable: true
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: InitExpr:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: Opcode: I32_CONST
|
|
|
|
; CHECK-NEXT: Value: 66560
|
|
|
|
; CHECK-NEXT: - Type: EXPORT
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Exports:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Name: memory
|
|
|
|
; CHECK-NEXT: Kind: MEMORY
|
|
|
|
; CHECK-NEXT: Index: 0
|
2018-03-01 17:38:02 +08:00
|
|
|
; CHECK-NEXT: - Name: _start
|
|
|
|
; CHECK-NEXT: Kind: FUNCTION
|
2019-03-02 06:35:47 +08:00
|
|
|
; CHECK-NEXT: Index: 0
|
2018-03-01 17:38:02 +08:00
|
|
|
; CHECK-NEXT: - Name: start_alias
|
|
|
|
; CHECK-NEXT: Kind: FUNCTION
|
2019-03-02 06:35:47 +08:00
|
|
|
; CHECK-NEXT: Index: 0
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Type: CODE
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Functions:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Index: 0
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: Locals:
|
2018-02-02 08:30:03 +08:00
|
|
|
; CHECK-NEXT: Body: 0B
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Type: CUSTOM
|
|
|
|
; CHECK-NEXT: Name: name
|
2018-01-24 08:22:53 +08:00
|
|
|
; CHECK-NEXT: FunctionNames:
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: - Index: 0
|
2018-03-12 23:44:07 +08:00
|
|
|
; CHECK-NEXT: Name: _start
|
2018-01-13 01:56:15 +08:00
|
|
|
; CHECK-NEXT: ...
|