51 lines · plain
1# RUN: llvm-mc -triple=wasm32 -filetype=obj %s -o - | obj2yaml | FileCheck %s2 3 .section .text.foo,"G",@,abc123,comdat4 .globl foo5 .type foo,@function6foo:7 .functype foo () -> ()8 return9 end_function10 11 .globl bar12bar:13 .functype bar () -> ()14 return15 end_function16 17 .section .debug_foo,"G",@,abc123,comdat18 .int32 4219 .section .debug_foo,"G",@,duplicate,comdat20 .int64 23421 22# Check that there are 2 identically-named custom sections, with the desired23# contents24# CHECK: - Type: CUSTOM25# CHECK-NEXT: Name: .debug_foo26# CHECK-NEXT: Payload: 2A00000027# CHECK-NEXT: - Type: CUSTOM28# CHECK-NEXT: Name: .debug_foo29# CHECK-NEXT: Payload: EA0000000000000030 31# And check that they are in 2 different comdat groups32# CHECK-NEXT:- Type: CUSTOM33# CHECK-NEXT: Name: linking34# CHECK-NEXT: Version: 235# CHECK: Comdats:36# CHECK-NEXT: - Name: abc12337# CHECK-NEXT: Entries:38# CHECK-NEXT: - Kind: FUNCTION39# CHECK-NEXT: Index: 040 41# If the user forgets to create a new section for a function, one is created for42# them by the assembler. Check that it is also in the same group.43# CHECK-NEXT: - Kind: FUNCTION44# CHECK-NEXT: Index: 145# CHECK-NEXT: - Kind: SECTION46# CHECK-NEXT: Index: 447# CHECK-NEXT: - Name: duplicate48# CHECK-NEXT: Entries:49# CHECK-NEXT: - Kind: SECTION50# CHECK-NEXT: Index: 551