2020-03-27 17:02:27 +01:00
|
|
|
# REQUIRES: powerpc-registered-target
|
|
|
|
|
2019-11-19 19:29:09 +01:00
|
|
|
# RUN: llvm-objdump -D %p/Inputs/xcoff-section-headers.o | \
|
2020-03-27 17:02:27 +01:00
|
|
|
# RUN: FileCheck --check-prefixes=CHECK,ONLY-D %s
|
|
|
|
|
|
|
|
# RUN: llvm-objdump -D -r %p/Inputs/xcoff-section-headers.o | \
|
|
|
|
# RUN: FileCheck --check-prefixes=CHECK,WITH-R %s
|
|
|
|
|
|
|
|
## xcoff-section-headers.o Compiled with IBM XL C/C++ for AIX, V16.1.0
|
|
|
|
## compiler command: xlc -qtls -o xcoff-section-headers.o -c test.c
|
|
|
|
## test.c:
|
|
|
|
## int a;
|
|
|
|
## int b = 12345;
|
|
|
|
## __thread int c;
|
|
|
|
## __thread double d = 3.14159;
|
|
|
|
##
|
|
|
|
## int func(void) {
|
|
|
|
## return a;
|
|
|
|
## }
|
2019-11-19 19:29:09 +01:00
|
|
|
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: Inputs/xcoff-section-headers.o: file format aixcoff-rs6000
|
|
|
|
CHECK: Disassembly of section .text:
|
|
|
|
CHECK: 00000000 <.text>:
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 0: 80 62 00 04 lwz 3, 4(2)
|
2020-03-27 17:02:27 +01:00
|
|
|
WITH-R-NEXT: 00000002: R_TOC a
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 4: 80 63 00 00 lwz 3, 0(3)
|
|
|
|
CHECK-NEXT: 8: 4e 80 00 20 blr
|
|
|
|
CHECK-NEXT: c: 00 00 00 00 <unknown>
|
|
|
|
CHECK-NEXT: 10: 00 00 20 40 <unknown>
|
|
|
|
CHECK-NEXT: 14: 00 00 00 01 <unknown>
|
|
|
|
CHECK-NEXT: 18: 00 00 00 0c <unknown>
|
|
|
|
CHECK-NEXT: 1c: 00 04 66 75 <unknown>
|
|
|
|
CHECK-NEXT: 20: 6e 63 00 00 xoris 3, 19, 0
|
|
|
|
CHECK-NEXT: ...
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: Disassembly of section .data:
|
|
|
|
CHECK: 00000080 <func>:
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 80: 00 00 00 94 <unknown>
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: 00000084 <a>:
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 84: 00 00 00 a4 <unknown>
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: 00000088 <b>:
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 88: 00 00 00 a0 <unknown>
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: 0000008c <c>:
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 8c: 00 00 00 08 <unknown>
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: 00000090 <d>:
|
|
|
|
ONLY-D-NEXT: 90: 00 00 00 00 <unknown>
|
|
|
|
WITH-R-NEXT: ...
|
|
|
|
CHECK: 00000094 <func>:
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 94: 00 00 00 00 <unknown>
|
|
|
|
CHECK-NEXT: 98: 00 00 00 80 <unknown>
|
|
|
|
CHECK-NEXT: 9c: 00 00 00 00 <unknown>
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: 000000a0 <b>:
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: a0: 00 00 30 39 <unknown>
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: Disassembly of section .bss:
|
|
|
|
CHECK: 000000a4 <a>:
|
|
|
|
CHECK-NEXT: ...
|
|
|
|
CHECK: Disassembly of section .tdata:
|
|
|
|
CHECK: 00000000 <d>:
|
[Object] Update ObjectFile::makeTriple for XCOFF
Summary:
When we encounter an XCOFF file, reflect that in the triple information.
In addition to knowing the object file format, we know that the
associated OS is AIX.
This means that we can expect that there is no output difference in the
processing of an XCOFF32 input file between cases where the triple is
left unspecified by the user and cases where the user specifies
`--triple powerpc-ibm-aix` explicitly.
Reviewers: jhenderson, sfertile, jasonliu, daltenty
Reviewed By: jasonliu
Subscribers: wuzish, nemanjai, hiraditya, MaskRay, rupprecht, steven.zhang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77025
2020-03-31 23:24:22 +02:00
|
|
|
CHECK-NEXT: 0: 40 09 21 f9 bdnzfl 9, $+8696
|
2019-11-19 19:29:09 +01:00
|
|
|
CHECK-NEXT: 4: f0 1b 86 6e <unknown>
|
2020-03-27 17:02:27 +01:00
|
|
|
CHECK: Disassembly of section .tbss:
|
|
|
|
CHECK: 00000008 <c>:
|
|
|
|
CHECK-NEXT: ...
|