1# REQUIRES: powerpc-registered-target
2
3# RUN: llvm-objdump -D %p/Inputs/xcoff-section-headers.o | \
4# RUN:   FileCheck %s
5
6# RUN: llvm-objdump -D -r %p/Inputs/xcoff-section-headers.o | \
7# RUN:   FileCheck --check-prefixes=CHECK,WITH-R %s
8
9## xcoff-section-headers.o Compiled with IBM XL C/C++ for AIX, V16.1.0
10## compiler command: xlc -qtls -o xcoff-section-headers.o -c test.c
11## test.c:
12## int a;
13## int b = 12345;
14## __thread int c;
15## __thread double d = 3.14159;
16##
17## int func(void)  {
18##   return a;
19## }
20
21CHECK:        Inputs/xcoff-section-headers.o:	file format aixcoff-rs6000
22CHECK:        Disassembly of section .text:
23CHECK:        00000000 <.text>:
24CHECK-NEXT:        0: 80 62 00 04                  	lwz 3, 4(2)
25WITH-R-NEXT:                         00000002:  R_TOC        a
26CHECK-NEXT:        4: 80 63 00 00                  	lwz 3, 0(3)
27CHECK-NEXT:        8: 4e 80 00 20                  	blr
28CHECK-NEXT:        c: 00 00 00 00                  	<unknown>
29CHECK-NEXT:       10: 00 00 20 40                  	<unknown>
30CHECK-NEXT:       14: 00 00 00 01                  	<unknown>
31CHECK-NEXT:       18: 00 00 00 0c                  	<unknown>
32CHECK-NEXT:       1c: 00 04 66 75                  	<unknown>
33CHECK-NEXT:       20: 6e 63 00 00                  	xoris 3, 19, 0
34CHECK-NEXT: 		...
35CHECK:        Disassembly of section .data:
36CHECK:        00000080 <func>:
37CHECK-NEXT:       80: 00 00 00 94                  	<unknown>
38WITH-R-NEXT:                         00000080:  R_POS        func
39CHECK:        00000084 <a>:
40CHECK-NEXT:       84: 00 00 00 a4                  	<unknown>
41WITH-R-NEXT:                         00000084:  R_POS        a
42CHECK:        00000088 <b>:
43CHECK-NEXT:       88: 00 00 00 a0                  	<unknown>
44WITH-R-NEXT:                         00000088:  R_POS        b
45CHECK:        0000008c <c>:
46CHECK-NEXT:       8c: 00 00 00 08                  	<unknown>
47WITH-R-NEXT:                         0000008c:  R_TLS        c
48CHECK:        00000090 <d>:
49CHECK-NEXT:       90: 00 00 00 00                  	<unknown>
50WITH-R-NEXT:                         00000090:  R_TLS        d
51CHECK:        00000094 <func>:
52CHECK-NEXT:       94: 00 00 00 00                  	<unknown>
53WITH-R-NEXT:                         00000094:  R_POS        .func
54CHECK-NEXT:       98: 00 00 00 80                  	<unknown>
55WITH-R-NEXT:                         00000098:  R_POS        TOC
56CHECK-NEXT:       9c: 00 00 00 00                  	<unknown>
57CHECK:        000000a0 <b>:
58CHECK-NEXT:       a0: 00 00 30 39                  	<unknown>
59CHECK:        Disassembly of section .bss:
60CHECK:        000000a4 <a>:
61CHECK-NEXT:        ...
62CHECK:        Disassembly of section .tdata:
63CHECK:        00000000 <d>:
64CHECK-NEXT:        0: 40 09 21 f9                  	bdnzfl	9, 0x21f8
65CHECK-NEXT:        4: f0 1b 86 6e                  	<unknown>
66CHECK:        Disassembly of section .tbss:
67CHECK:        00000008 <c>:
68CHECK-NEXT:        ...
69