brintos

brintos / llvm-project-archived public Read only

0
0
Text · 920 B · 1509715 Raw
33 lines · plain
1# Test the --export of optional linker-synthetic symbols works.2# Specifically the __start_xxx and __end_xx symbols.3 4# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o5# RUN: wasm-ld --export=__start_foo %t.o -o %t.wasm6# RUN: obj2yaml %t.wasm | FileCheck %s7 8  .globl  _start9_start:10  .functype _start () -> ()11  i32.const 012  i32.load foo13  drop14  end_function15 16  .globl  foo17  .section    foo,"",@18foo:19  .int32 4220  .size foo, 421 22#      CHECK:  - Type:            EXPORT23# CHECK-NEXT:    Exports:24# CHECK-NEXT:      - Name:            memory25# CHECK-NEXT:        Kind:            MEMORY26# CHECK-NEXT:        Index:           027# CHECK-NEXT:      - Name:            _start28# CHECK-NEXT:        Kind:            FUNCTION29# CHECK-NEXT:        Index:           030# CHECK-NEXT:      - Name:            __start_foo31# CHECK-NEXT:        Kind:            GLOBAL32# CHECK-NEXT:        Index:           133