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