46 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s2# RUN: wasm-ld -no-gc-sections --no-entry --export=__data_end %t.o -o %t.wasm3# RUN: obj2yaml %t.wasm | FileCheck %s4 5# Test that the data section is skipped entirely when there are only6# bss segments7 8 .section .bss.a,"",@9 .globl a10a:11 .skip 100012 .size a, 100013 14 .section .bss.b,"",@15 .globl b16b:17 .int32 018 .size b, 419 20# CHECK-NOT: - Type: DATA21 22# CHECK: - Type: GLOBAL23# CHECK-NEXT: Globals:24# CHECK-NEXT: - Index: 025# CHECK-NEXT: Type: I3226# CHECK-NEXT: Mutable: true27# CHECK-NEXT: InitExpr:28# CHECK-NEXT: Opcode: I32_CONST29# CHECK-NEXT: Value: 6553630# CHECK-NEXT: - Index: 131# CHECK-NEXT: Type: I3232# CHECK-NEXT: Mutable: false33# CHECK-NEXT: InitExpr:34# CHECK-NEXT: Opcode: I32_CONST35# CHECK-NEXT: Value: 6654036# CHECK-NEXT: - Type: EXPORT37# CHECK-NEXT: Exports:38# CHECK-NEXT: - Name: memory39# CHECK-NEXT: Kind: MEMORY40# CHECK-NEXT: Index: 041# CHECK-NEXT: - Name: __data_end42# CHECK-NEXT: Kind: GLOBAL43# CHECK-NEXT: Index: 144 45# CHECK-NOT: DataSegmentNames:46