1 # RUN: llvm-mc -triple=wasm32 -filetype=obj %s -o - | obj2yaml | FileCheck %s
3 .section .text.foo,"G",@,abc123,comdat
13 .functype bar () -> ()
17 .section .debug_foo,"G",@,abc123,comdat
19 .section .debug_foo,"G",@,duplicate,comdat
22 # Check that there are 2 identically-named custom sections, with the desired
24 # CHECK: - Type: CUSTOM
25 # CHECK-NEXT: Name: .debug_foo
26 # CHECK-NEXT: Payload: 2A000000
27 # CHECK-NEXT: - Type: CUSTOM
28 # CHECK-NEXT: Name: .debug_foo
29 # CHECK-NEXT: Payload: EA00000000000000
31 # And check that they are in 2 different comdat groups
32 # CHECK-NEXT:- Type: CUSTOM
33 # CHECK-NEXT: Name: linking
34 # CHECK-NEXT: Version: 2
36 # CHECK-NEXT: - Name: abc123
37 # CHECK-NEXT: Entries:
38 # CHECK-NEXT: - Kind: FUNCTION
39 # CHECK-NEXT: Index: 0
41 # If the user forgets to create a new section for a function, one is created for
42 # them by the assembler. Check that it is also in the same group.
43 # CHECK-NEXT: - Kind: FUNCTION
44 # CHECK-NEXT: Index: 1
45 # CHECK-NEXT: - Kind: SECTION
46 # CHECK-NEXT: Index: 4
47 # CHECK-NEXT: - Name: duplicate
48 # CHECK-NEXT: Entries:
49 # CHECK-NEXT: - Kind: SECTION
50 # CHECK-NEXT: Index: 5