• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -sections -section-symbols | FileCheck %s
2
3        .text
4        .def     weak_func;
5        .scl    2;
6        .type   32;
7        .endef
8        .section        .text,"xr",discard,weak_func
9        .globl  weak_func
10        .align  16, 0x90
11weak_func:                              # @weak_func
12.Ltmp0:
13.seh_proc weak_func
14# BB#0:                                 # %entry
15        pushq   %rbp
16.Ltmp1:
17        .seh_pushreg 5
18        movq    %rsp, %rbp
19.Ltmp2:
20        .seh_setframe 5, 0
21.Ltmp3:
22        .seh_endprologue
23        xorl    %eax, %eax
24        popq    %rbp
25        retq
26.Leh_func_end0:
27.Ltmp4:
28        .seh_endproc
29
30// CHECK: Sections [
31// CHECK:   Section {
32// CHECK:     Name: .text
33// CHECK:   }
34// CHECK:   Section {
35// CHECK:     Name: .data
36// CHECK:   }
37// CHECK:   Section {
38// CHECK:     Name: .bss
39// CHECK:   }
40// CHECK:   Section {
41// CHECK:     Number: [[TEXT_SECNUM:[0-9]+]]
42// CHECK:     Name: .text
43// CHECK:     Characteristics [
44// CHECK:       IMAGE_SCN_LNK_COMDAT
45// CHECK:     ]
46// CHECK:   }
47// CHECK:   Section {
48// CHECK:     Number: [[XDATA_SECNUM:[0-9]+]]
49// CHECK:     Name: .xdata
50// CHECK:     Characteristics [
51// CHECK:       IMAGE_SCN_LNK_COMDAT
52// CHECK:     ]
53// CHECK:     Symbols [
54// CHECK:       Symbol {
55// CHECK:         Name: .xdata
56// CHECK:         Section: .xdata ([[XDATA_SECNUM]])
57// CHECK:         StorageClass: Static (0x3)
58// CHECK:         AuxSymbolCount: 1
59// CHECK:         AuxSectionDef {
60// CHECK:           Selection: Associative (0x5)
61// CHECK:           AssocSection: .text ([[TEXT_SECNUM]])
62// CHECK:         }
63// CHECK:       }
64// CHECK:     ]
65// CHECK:   }
66// CHECK:   Section {
67// CHECK:     Number: [[PDATA_SECNUM:[0-9]+]]
68// CHECK:     Name: .pdata
69// CHECK:     Characteristics [
70// CHECK:       IMAGE_SCN_LNK_COMDAT
71// CHECK:     ]
72// CHECK:     Symbols [
73// CHECK:       Symbol {
74// CHECK:         Name: .pdata
75// CHECK:         Section: .pdata ([[PDATA_SECNUM]])
76// CHECK:         StorageClass: Static (0x3)
77// CHECK:         AuxSymbolCount: 1
78// CHECK:         AuxSectionDef {
79// CHECK:           Selection: Associative (0x5)
80// CHECK:           AssocSection: .text ([[TEXT_SECNUM]])
81// CHECK:         }
82// CHECK:       }
83// CHECK:     ]
84// CHECK:   }
85// CHECK: ]
86