Skip to content

Commit 0dc5e0c

Browse files
committed
[XCOFF][llvm-readobj] Move XCOFF test to XCOFF directory
Summary: COFF and XCOFF in llvm are very different and serves different platform. Since we have different Dumper.cpp file in llvm-readobj's implementation, we should have separate testing directory for them too. Reviewed By: jhenderson, DiggerLin Differential Revision: https://reviews.llvm.org/D85675
1 parent b9aaf32 commit 0dc5e0c

File tree

11 files changed

+46
-46
lines changed

11 files changed

+46
-46
lines changed

llvm/test/tools/llvm-readobj/COFF/xcoff-basic.test renamed to llvm/test/tools/llvm-readobj/XCOFF/basic.test

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic.o | \
1+
# RUN: llvm-readobj --file-header %p/Inputs/basic.o | \
22
# RUN: FileCheck --check-prefix=FILEHEADER %s
33
#
4-
# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-64.o | \
4+
# RUN: llvm-readobj --file-header %p/Inputs/basic64.o | \
55
# RUN: FileCheck --check-prefix=FILEHEADER64 %s
66

7-
# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-neg-time.o | \
7+
# RUN: llvm-readobj --file-header %p/Inputs/basic-neg-time.o | \
88
# RUN: FileCheck --check-prefix=NEGTIME %s
99

10-
# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-neg-sym-count.o | \
10+
# RUN: llvm-readobj --file-header %p/Inputs/basic-neg-sym-count.o | \
1111
# RUN: FileCheck --check-prefix=NEGSYMCOUNT %s
1212

13-
# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/xcoff-basic.o | \
13+
# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/basic.o | \
1414
# RUN: FileCheck --check-prefix=RELOCSEXP %s
1515

16-
# FILEHEADER: File: {{.*}}xcoff-basic.o
16+
# FILEHEADER: File: {{.*}}basic.o
1717
# FILEHEADER-NEXT: Format: aixcoff-rs6000
1818
# FILEHEADER-NEXT: Arch: powerpc
1919
# FILEHEADER-NEXT: AddressSize: 32bit
@@ -27,7 +27,7 @@
2727
# FILEHEADER-NEXT: Flags: 0x0
2828
# FILEHEADER-NEXT: }
2929

30-
# FILEHEADER64: File: {{.*}}xcoff-basic-64.o
30+
# FILEHEADER64: File: {{.*}}basic64.o
3131
# FILEHEADER64-NEXT: Format: aix5coff64-rs6000
3232
# FILEHEADER64-NEXT: Arch: powerpc64
3333
# FILEHEADER64-NEXT: AddressSize: 64bit
@@ -41,7 +41,7 @@
4141
# FILEHEADER64-NEXT: Flags: 0x0
4242
# FILEHEADER64-NEXT: }
4343

44-
# NEGTIME: File: {{.*}}xcoff-basic-neg-time.o
44+
# NEGTIME: File: {{.*}}basic-neg-time.o
4545
# NEGTIME-NEXT: Format: aixcoff-rs6000
4646
# NEGTIME-NEXT: Arch: powerpc
4747
# NEGTIME-NEXT: AddressSize: 32bit
@@ -55,7 +55,7 @@
5555
# NEGTIME-NEXT: Flags: 0x0
5656
# NEGTIME-NEXT: }
5757

58-
# NEGSYMCOUNT: File: {{.*}}xcoff-basic-neg-sym-count.o
58+
# NEGSYMCOUNT: File: {{.*}}basic-neg-sym-count.o
5959
# NEGSYMCOUNT-NEXT: Format: aixcoff-rs6000
6060
# NEGSYMCOUNT-NEXT: Arch: powerpc
6161
# NEGSYMCOUNT-NEXT: AddressSize: 32bit
@@ -84,7 +84,7 @@
8484
# xcoff-basic-neg-sym-count.o was stripped using the 'strip' utility, and
8585
# manually edited to have a negative symbol table entry count.
8686

87-
# RELOCSEXP: File: {{.*}}xcoff-basic.o
87+
# RELOCSEXP: File: {{.*}}basic.o
8888
# RELOCSEXP-NEXT: Format: aixcoff-rs6000
8989
# RELOCSEXP-NEXT: Arch: powerpc
9090
# RELOCSEXP-NEXT: AddressSize: 32bit

llvm/test/tools/llvm-readobj/COFF/xcoff-overflow-section.test renamed to llvm/test/tools/llvm-readobj/XCOFF/overflow-section.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# RUN: llvm-readobj --sections %p/Inputs/xcoff-reloc-overflow.o | \
1+
# RUN: llvm-readobj --sections %p/Inputs/reloc-overflow.o | \
22
# RUN: FileCheck --check-prefix=SECOVERFLOW %s
3-
# SECOVERFLOW: File: {{.*}}xcoff-reloc-overflow.o
3+
# SECOVERFLOW: File: {{.*}}reloc-overflow.o
44
# SECOVERFLOW-NEXT: Format: aixcoff-rs6000
55
# SECOVERFLOW-NEXT: Arch: powerpc
66
# SECOVERFLOW-NEXT: AddressSize: 32bit

llvm/test/tools/llvm-readobj/COFF/reloc_overflow.test renamed to llvm/test/tools/llvm-readobj/XCOFF/reloc_overflow.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# RUN: llvm-readobj --sections %p/Inputs/xcoff-reloc-overflow.o | \
1+
# RUN: llvm-readobj --sections %p/Inputs/reloc-overflow.o | \
22
# RUN: FileCheck --check-prefix=SECOVERFLOW %s
33

4-
# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/xcoff-reloc-overflow.o | \
4+
# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/reloc-overflow.o | \
55
# RUN: FileCheck --check-prefix=RELOCOVERFLOW %s
66

7-
# SECOVERFLOW: File: {{.*}}xcoff-reloc-overflow.o
7+
# SECOVERFLOW: File: {{.*}}reloc-overflow.o
88
# SECOVERFLOW-NEXT: Format: aixcoff-rs6000
99
# SECOVERFLOW-NEXT: Arch: powerpc
1010
# SECOVERFLOW-NEXT: AddressSize: 32bit

llvm/test/tools/llvm-readobj/COFF/xcoff-sections.test renamed to llvm/test/tools/llvm-readobj/XCOFF/sections.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# RUN: llvm-readobj --section-headers %p/Inputs/xcoff-basic.o | \
1+
# RUN: llvm-readobj --section-headers %p/Inputs/basic.o | \
22
# RUN: FileCheck --check-prefix=SEC32 %s
33

4-
# RUN: llvm-readobj --section-headers %p/Inputs/xcoff-basic-64.o | \
4+
# RUN: llvm-readobj --section-headers %p/Inputs/basic64.o | \
55
# RUN: FileCheck --check-prefix=SEC64 %s
66

7-
# SEC32: File: {{.*}}xcoff-basic.o
7+
# SEC32: File: {{.*}}basic.o
88
# SEC32-NEXT: Format: aixcoff-rs6000
99
# SEC32-NEXT: Arch: powerpc
1010
# SEC32-NEXT: AddressSize: 32bit
@@ -90,7 +90,7 @@
9090
# SEC32-NEXT: ]
9191

9292

93-
# SEC64: File: {{.*}}xcoff-basic-64.o
93+
# SEC64: File: {{.*}}basic64.o
9494
# SEC64-NEXT: Format: aix5coff64-rs6000
9595
# SEC64-NEXT: Arch: powerpc64
9696
# SEC64-NEXT: AddressSize: 64bit

llvm/test/tools/llvm-readobj/COFF/xcoff-symbols.test renamed to llvm/test/tools/llvm-readobj/XCOFF/symbols.test

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
# This file tests the ability of llvm-readobj to display the symbol table for a
22
# 32-bit XCOFF object file.
3-
RUN: llvm-readobj --symbols %p/Inputs/aix_xcoff_xlc_test8.o | \
3+
# The object file used is generated by the following source file
4+
# and command on AIX:
5+
#
6+
# > cat test8.c
7+
#
8+
# extern int i;
9+
# extern int TestforXcoff;
10+
# extern int fun(int i);
11+
# static int static_i;
12+
# char* p="abcd";
13+
# int fun1(int j) {
14+
# static_i++;
15+
# j++;
16+
# j=j+*p;
17+
# return j;
18+
# }
19+
#
20+
# int main() {
21+
# i++;
22+
# fun(i);
23+
# return fun1(i);
24+
# }
25+
#
26+
# > xlc -c test8.c -o symbol.o
27+
28+
RUN: llvm-readobj --symbols %p/Inputs/symbol.o | \
429
RUN: FileCheck --check-prefix=SYMBOL32 %s
530

6-
SYMBOL32: File: {{.*}}aix_xcoff_xlc_test8.o
31+
SYMBOL32: File: {{.*}}symbol.o
732
SYMBOL32-NEXT: Format: aixcoff-rs6000
833
SYMBOL32-NEXT: Arch: powerpc
934
SYMBOL32-NEXT: AddressSize: 32bit
@@ -419,28 +444,3 @@ SYMBOL32-NEXT: StabSectNum: 0x0
419444
SYMBOL32-NEXT: }
420445
SYMBOL32-NEXT: }
421446
SYMBOL32-NEXT: ]
422-
423-
# The object file used is generated by the following source file
424-
# and command on AIX:
425-
#
426-
# > cat test8.c
427-
#
428-
# extern int i;
429-
# extern int TestforXcoff;
430-
# extern int fun(int i);
431-
# static int static_i;
432-
# char* p="abcd";
433-
# int fun1(int j) {
434-
# static_i++;
435-
# j++;
436-
# j=j+*p;
437-
# return j;
438-
# }
439-
#
440-
# int main() {
441-
# i++;
442-
# fun(i);
443-
# return fun1(i);
444-
# }
445-
#
446-
# > xlc -c test8.c -o aix_xcoff_xlc_test8.o

0 commit comments

Comments
 (0)