1 // This test ensures functions in custom sections get unwind info emitted in a
2 // distinct .xdata section. Ideally we'd just emit a second .xdata section with
3 // the same name and characteristics, but MC uniques sections by name and
4 // characteristics, so that is not possible.
5 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s
7 // CHECK: Name: .xdata$foo
8 // CHECK-NEXT: VirtualSize
9 // CHECK-NEXT: VirtualAddress
10 // CHECK-NEXT: RawDataSize: 8
11 // CHECK-NEXT: PointerToRawData
12 // CHECK-NEXT: PointerToRelocations
13 // CHECK-NEXT: PointerToLineNumbers
14 // CHECK-NEXT: RelocationCount: 0
15 // CHECK-NEXT: LineNumberCount: 0
16 // CHECK-NEXT: Characteristics [
17 // CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
18 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
19 // CHECK-NEXT: IMAGE_SCN_MEM_READ
21 // CHECK-NEXT: SectionData (
22 // CHECK-NEXT: 0000: 01050200 05500402
25 // CHECK: Name: .xdata$.mytext
26 // CHECK-NEXT: VirtualSize
27 // CHECK-NEXT: VirtualAddress
28 // CHECK-NEXT: RawDataSize: 8
29 // CHECK-NEXT: PointerToRawData
30 // CHECK-NEXT: PointerToRelocations
31 // CHECK-NEXT: PointerToLineNumbers
32 // CHECK-NEXT: RelocationCount: 0
33 // CHECK-NEXT: LineNumberCount: 0
34 // CHECK-NEXT: Characteristics [
35 // CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
36 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
37 // CHECK-NEXT: IMAGE_SCN_MEM_READ
39 // CHECK-NEXT: SectionData (
40 // CHECK-NEXT: 0000: 01050200 05500402
43 // CHECK: Name: .xdata
44 // CHECK-NEXT: VirtualSize
45 // CHECK-NEXT: VirtualAddress
46 // CHECK-NEXT: RawDataSize: 8
47 // CHECK-NEXT: PointerToRawData
48 // CHECK-NEXT: PointerToRelocations
49 // CHECK-NEXT: PointerToLineNumbers
50 // CHECK-NEXT: RelocationCount: 0
51 // CHECK-NEXT: LineNumberCount: 0
52 // CHECK-NEXT: Characteristics [
53 // CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
54 // CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
55 // CHECK-NEXT: IMAGE_SCN_MEM_READ
57 // CHECK-NEXT: SectionData (
58 // CHECK-NEXT: 0000: 01050200 05500402
63 .section .text$foo,"x"
65 .def foo; .scl 2; .type 32; .endef
80 .def bar; .scl 2; .type 32; .endef
95 .def baz; .scl 2; .type 32; .endef