1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK
2 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s --check-prefix CHECK
3 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mxcoff-roptr < %s | FileCheck %s --check-prefix CHECK-RO
4 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mxcoff-roptr < %s | FileCheck %s --check-prefix CHECK-RO
6 ; RUN: llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff -verify-machineinstrs < %s -o %t32.o
7 ; RUN: llvm-readobj %t32.o --syms --relocs | FileCheck %s -D#NFA=2 --check-prefix=OBJ32
9 ; RUN: llc -filetype=obj -mtriple powerpc64-ibm-aix-xcoff -verify-machineinstrs < %s -o %t64.o
10 ; RUN: llvm-readobj %t64.o --syms --relocs | FileCheck %s -D#NFA=2 --check-prefix=OBJ64
12 @var = external constant i32
13 @ptr = private constant ptr @var, section "relro-section"
15 ; CHECK: .extern var[UA]
16 ; CHECK: .csect _Renamed..2drelro_section[RW]
18 ; CHECK-RO: .extern var[UA]
19 ; CHECK-RO: .csect _Renamed..2drelro_section[RO]
21 ; OBJ32: Relocations [
22 ; OBJ32-NEXT: Section (index: 2) .data {
23 ; OBJ32-NEXT: 0x0 R_POS var([[#NFA+1]]) 0x1F
26 ; OBJ32-NEXT: Symbols [
27 ; OBJ32: Index: [[#NFA+1]]
28 ; OBJ32-NEXT: Name: var
29 ; OBJ32-NEXT: Value (RelocatableAddress): 0x0
30 ; OBJ32-NEXT: Section: N_UNDEF
31 ; OBJ32-NEXT: Type: 0x0
32 ; OBJ32-NEXT: StorageClass: C_EXT (0x2)
33 ; OBJ32-NEXT: NumberOfAuxEntries: 1
34 ; OBJ32-NEXT: CSECT Auxiliary Entry {
35 ; OBJ32-NEXT: Index: [[#NFA+2]]
36 ; OBJ32-NEXT: SectionLen: 0
37 ; OBJ32-NEXT: ParameterHashIndex: 0x0
38 ; OBJ32-NEXT: TypeChkSectNum: 0x0
39 ; OBJ32-NEXT: SymbolAlignmentLog2: 0
40 ; OBJ32-NEXT: SymbolType: XTY_ER (0x0)
41 ; OBJ32-NEXT: StorageMappingClass: XMC_UA (0x4)
42 ; OBJ32-NEXT: StabInfoIndex: 0x0
43 ; OBJ32-NEXT: StabSectNum: 0x0
45 ; OBJ32: Index: [[#NFA+5]]
46 ; OBJ32-NEXT: Name: relro-section
47 ; OBJ32-NEXT: Value (RelocatableAddress): 0x0
48 ; OBJ32-NEXT: Section: .data
49 ; OBJ32-NEXT: Type: 0x0
50 ; OBJ32-NEXT: StorageClass: C_HIDEXT (0x6B)
51 ; OBJ32-NEXT: NumberOfAuxEntries: 1
52 ; OBJ32-NEXT: CSECT Auxiliary Entry {
53 ; OBJ32-NEXT: Index: [[#NFA+6]]
54 ; OBJ32-NEXT: SectionLen: 4
55 ; OBJ32-NEXT: ParameterHashIndex: 0x0
56 ; OBJ32-NEXT: TypeChkSectNum: 0x0
57 ; OBJ32-NEXT: SymbolAlignmentLog2: 2
58 ; OBJ32-NEXT: SymbolType: XTY_SD (0x1)
59 ; OBJ32-NEXT: StorageMappingClass: XMC_RW (0x5)
60 ; OBJ32-NEXT: StabInfoIndex: 0x0
61 ; OBJ32-NEXT: StabSectNum: 0x0
65 ; OBJ64: Relocations [
66 ; OBJ64-NEXT: Section (index: 2) .data {
67 ; OBJ64-NEXT: 0x0 R_POS var([[#NFA+1]]) 0x3F
70 ; OBJ64-NEXT: Symbols [
71 ; OBJ64: Index: [[#NFA+1]]
72 ; OBJ64-NEXT: Name: var
73 ; OBJ64-NEXT: Value (RelocatableAddress): 0x0
74 ; OBJ64-NEXT: Section: N_UNDEF
75 ; OBJ64-NEXT: Type: 0x0
76 ; OBJ64-NEXT: StorageClass: C_EXT (0x2)
77 ; OBJ64-NEXT: NumberOfAuxEntries: 1
78 ; OBJ64-NEXT: CSECT Auxiliary Entry {
79 ; OBJ64-NEXT: Index: [[#NFA+2]]
80 ; OBJ64-NEXT: SectionLen: 0
81 ; OBJ64-NEXT: ParameterHashIndex: 0x0
82 ; OBJ64-NEXT: TypeChkSectNum: 0x0
83 ; OBJ64-NEXT: SymbolAlignmentLog2: 0
84 ; OBJ64-NEXT: SymbolType: XTY_ER (0x0)
85 ; OBJ64-NEXT: StorageMappingClass: XMC_UA (0x4)
86 ; OBJ64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)
88 ; OBJ64: Index: [[#NFA+5]]
89 ; OBJ64-NEXT: Name: relro-section
90 ; OBJ64-NEXT: Value (RelocatableAddress): 0x0
91 ; OBJ64-NEXT: Section: .data
92 ; OBJ64-NEXT: Type: 0x0
93 ; OBJ64-NEXT: StorageClass: C_HIDEXT (0x6B)
94 ; OBJ64-NEXT: NumberOfAuxEntries: 1
95 ; OBJ64-NEXT: CSECT Auxiliary Entry {
96 ; OBJ64-NEXT: Index: [[#NFA+6]]
97 ; OBJ64-NEXT: SectionLen: 8
98 ; OBJ64-NEXT: ParameterHashIndex: 0x0
99 ; OBJ64-NEXT: TypeChkSectNum: 0x0
100 ; OBJ64-NEXT: SymbolAlignmentLog2: 3
101 ; OBJ64-NEXT: SymbolType: XTY_SD (0x1)
102 ; OBJ64-NEXT: StorageMappingClass: XMC_RW (0x5)
103 ; OBJ64-NEXT: Auxiliary Type: AUX_CSECT (0xFB)