forked from OSchip/llvm-project
61 lines
2.1 KiB
ArmAsm
61 lines
2.1 KiB
ArmAsm
# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
|
|
# RUN: wasm-ld --export=start_alias %t.o -o %t.wasm
|
|
# RUN: obj2yaml %t.wasm | FileCheck %s
|
|
|
|
.globl _start
|
|
_start:
|
|
.functype _start () -> ()
|
|
end_function
|
|
|
|
.globl start_alias
|
|
.type start_alias,@function
|
|
.set start_alias, _start
|
|
|
|
# CHECK: --- !WASM
|
|
# CHECK-NEXT: FileHeader:
|
|
# CHECK-NEXT: Version: 0x1
|
|
# CHECK-NEXT: Sections:
|
|
# CHECK-NEXT: - Type: TYPE
|
|
# CHECK-NEXT: Signatures:
|
|
# CHECK-NEXT: - Index: 0
|
|
# CHECK-NEXT: ParamTypes:
|
|
# CHECK-NEXT: ReturnTypes: []
|
|
# CHECK-NEXT: - Type: FUNCTION
|
|
# CHECK-NEXT: FunctionTypes: [ 0 ]
|
|
# CHECK-NEXT: - Type: MEMORY
|
|
# CHECK-NEXT: Memories:
|
|
# CHECK-NEXT: - Initial: 0x2
|
|
# CHECK-NEXT: - Type: GLOBAL
|
|
# CHECK-NEXT: Globals:
|
|
# CHECK-NEXT: - Index: 0
|
|
# CHECK-NEXT: Type: I32
|
|
# CHECK-NEXT: Mutable: true
|
|
# CHECK-NEXT: InitExpr:
|
|
# CHECK-NEXT: Opcode: I32_CONST
|
|
# CHECK-NEXT: Value: 66560
|
|
# CHECK-NEXT: - Type: EXPORT
|
|
# CHECK-NEXT: Exports:
|
|
# CHECK-NEXT: - Name: memory
|
|
# CHECK-NEXT: Kind: MEMORY
|
|
# CHECK-NEXT: Index: 0
|
|
# CHECK-NEXT: - Name: _start
|
|
# CHECK-NEXT: Kind: FUNCTION
|
|
# CHECK-NEXT: Index: 0
|
|
# CHECK-NEXT: - Name: start_alias
|
|
# CHECK-NEXT: Kind: FUNCTION
|
|
# CHECK-NEXT: Index: 0
|
|
# CHECK-NEXT: - Type: CODE
|
|
# CHECK-NEXT: Functions:
|
|
# CHECK-NEXT: - Index: 0
|
|
# CHECK-NEXT: Locals:
|
|
# CHECK-NEXT: Body: 0B
|
|
# CHECK-NEXT: - Type: CUSTOM
|
|
# CHECK-NEXT: Name: name
|
|
# CHECK-NEXT: FunctionNames:
|
|
# CHECK-NEXT: - Index: 0
|
|
# CHECK-NEXT: Name: _start
|
|
# CHECK-NEXT: GlobalNames:
|
|
# CHECK-NEXT: - Index: 0
|
|
# CHECK-NEXT: Name: __stack_pointer
|
|
# CHECK-NEXT: ...
|