[llvm] 0dc5e0c - [XCOFF][llvm-readobj] Move XCOFF test to XCOFF directory
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 10:32:25 PDT 2020
Author: jasonliu
Date: 2020-08-11T17:31:59Z
New Revision: 0dc5e0cd393d1bf451c27c1a2d8471a4df0f42b0
URL: https://github.com/llvm/llvm-project/commit/0dc5e0cd393d1bf451c27c1a2d8471a4df0f42b0
DIFF: https://github.com/llvm/llvm-project/commit/0dc5e0cd393d1bf451c27c1a2d8471a4df0f42b0.diff
LOG: [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
Added:
llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-sym-count.o
llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-time.o
llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic.o
llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic64.o
llvm/test/tools/llvm-readobj/XCOFF/Inputs/reloc-overflow.o
llvm/test/tools/llvm-readobj/XCOFF/Inputs/symbol.o
llvm/test/tools/llvm-readobj/XCOFF/basic.test
llvm/test/tools/llvm-readobj/XCOFF/overflow-section.test
llvm/test/tools/llvm-readobj/XCOFF/reloc_overflow.test
llvm/test/tools/llvm-readobj/XCOFF/sections.test
llvm/test/tools/llvm-readobj/XCOFF/symbols.test
Modified:
Removed:
llvm/test/tools/llvm-readobj/COFF/Inputs/aix_xcoff_xlc_test8.o
llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-64.o
llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-sym-count.o
llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-time.o
llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic.o
llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-reloc-overflow.o
llvm/test/tools/llvm-readobj/COFF/reloc_overflow.test
llvm/test/tools/llvm-readobj/COFF/xcoff-basic.test
llvm/test/tools/llvm-readobj/COFF/xcoff-overflow-section.test
llvm/test/tools/llvm-readobj/COFF/xcoff-sections.test
llvm/test/tools/llvm-readobj/COFF/xcoff-symbols.test
################################################################################
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-sym-count.o b/llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-sym-count.o
similarity index 100%
rename from llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-sym-count.o
rename to llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-sym-count.o
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-time.o b/llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-time.o
similarity index 100%
rename from llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-time.o
rename to llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-time.o
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic.o b/llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic.o
similarity index 100%
rename from llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic.o
rename to llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic.o
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-64.o b/llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic64.o
similarity index 100%
rename from llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-64.o
rename to llvm/test/tools/llvm-readobj/XCOFF/Inputs/basic64.o
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-reloc-overflow.o b/llvm/test/tools/llvm-readobj/XCOFF/Inputs/reloc-overflow.o
similarity index 100%
rename from llvm/test/tools/llvm-readobj/COFF/Inputs/xcoff-reloc-overflow.o
rename to llvm/test/tools/llvm-readobj/XCOFF/Inputs/reloc-overflow.o
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/aix_xcoff_xlc_test8.o b/llvm/test/tools/llvm-readobj/XCOFF/Inputs/symbol.o
similarity index 100%
rename from llvm/test/tools/llvm-readobj/COFF/Inputs/aix_xcoff_xlc_test8.o
rename to llvm/test/tools/llvm-readobj/XCOFF/Inputs/symbol.o
diff --git a/llvm/test/tools/llvm-readobj/COFF/xcoff-basic.test b/llvm/test/tools/llvm-readobj/XCOFF/basic.test
similarity index 89%
rename from llvm/test/tools/llvm-readobj/COFF/xcoff-basic.test
rename to llvm/test/tools/llvm-readobj/XCOFF/basic.test
index 8219f20e53d3d..9d9917274e84c 100644
--- a/llvm/test/tools/llvm-readobj/COFF/xcoff-basic.test
+++ b/llvm/test/tools/llvm-readobj/XCOFF/basic.test
@@ -1,19 +1,19 @@
-# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic.o | \
+# RUN: llvm-readobj --file-header %p/Inputs/basic.o | \
# RUN: FileCheck --check-prefix=FILEHEADER %s
#
-# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-64.o | \
+# RUN: llvm-readobj --file-header %p/Inputs/basic64.o | \
# RUN: FileCheck --check-prefix=FILEHEADER64 %s
-# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-neg-time.o | \
+# RUN: llvm-readobj --file-header %p/Inputs/basic-neg-time.o | \
# RUN: FileCheck --check-prefix=NEGTIME %s
-# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-neg-sym-count.o | \
+# RUN: llvm-readobj --file-header %p/Inputs/basic-neg-sym-count.o | \
# RUN: FileCheck --check-prefix=NEGSYMCOUNT %s
-# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/xcoff-basic.o | \
+# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/basic.o | \
# RUN: FileCheck --check-prefix=RELOCSEXP %s
-# FILEHEADER: File: {{.*}}xcoff-basic.o
+# FILEHEADER: File: {{.*}}basic.o
# FILEHEADER-NEXT: Format: aixcoff-rs6000
# FILEHEADER-NEXT: Arch: powerpc
# FILEHEADER-NEXT: AddressSize: 32bit
@@ -27,7 +27,7 @@
# FILEHEADER-NEXT: Flags: 0x0
# FILEHEADER-NEXT: }
-# FILEHEADER64: File: {{.*}}xcoff-basic-64.o
+# FILEHEADER64: File: {{.*}}basic64.o
# FILEHEADER64-NEXT: Format: aix5coff64-rs6000
# FILEHEADER64-NEXT: Arch: powerpc64
# FILEHEADER64-NEXT: AddressSize: 64bit
@@ -41,7 +41,7 @@
# FILEHEADER64-NEXT: Flags: 0x0
# FILEHEADER64-NEXT: }
-# NEGTIME: File: {{.*}}xcoff-basic-neg-time.o
+# NEGTIME: File: {{.*}}basic-neg-time.o
# NEGTIME-NEXT: Format: aixcoff-rs6000
# NEGTIME-NEXT: Arch: powerpc
# NEGTIME-NEXT: AddressSize: 32bit
@@ -55,7 +55,7 @@
# NEGTIME-NEXT: Flags: 0x0
# NEGTIME-NEXT: }
-# NEGSYMCOUNT: File: {{.*}}xcoff-basic-neg-sym-count.o
+# NEGSYMCOUNT: File: {{.*}}basic-neg-sym-count.o
# NEGSYMCOUNT-NEXT: Format: aixcoff-rs6000
# NEGSYMCOUNT-NEXT: Arch: powerpc
# NEGSYMCOUNT-NEXT: AddressSize: 32bit
@@ -84,7 +84,7 @@
# xcoff-basic-neg-sym-count.o was stripped using the 'strip' utility, and
# manually edited to have a negative symbol table entry count.
-# RELOCSEXP: File: {{.*}}xcoff-basic.o
+# RELOCSEXP: File: {{.*}}basic.o
# RELOCSEXP-NEXT: Format: aixcoff-rs6000
# RELOCSEXP-NEXT: Arch: powerpc
# RELOCSEXP-NEXT: AddressSize: 32bit
diff --git a/llvm/test/tools/llvm-readobj/COFF/xcoff-overflow-section.test b/llvm/test/tools/llvm-readobj/XCOFF/overflow-section.test
similarity index 93%
rename from llvm/test/tools/llvm-readobj/COFF/xcoff-overflow-section.test
rename to llvm/test/tools/llvm-readobj/XCOFF/overflow-section.test
index 8ff911b1d79c7..a3f026c801bb1 100644
--- a/llvm/test/tools/llvm-readobj/COFF/xcoff-overflow-section.test
+++ b/llvm/test/tools/llvm-readobj/XCOFF/overflow-section.test
@@ -1,6 +1,6 @@
-# RUN: llvm-readobj --sections %p/Inputs/xcoff-reloc-overflow.o | \
+# RUN: llvm-readobj --sections %p/Inputs/reloc-overflow.o | \
# RUN: FileCheck --check-prefix=SECOVERFLOW %s
-# SECOVERFLOW: File: {{.*}}xcoff-reloc-overflow.o
+# SECOVERFLOW: File: {{.*}}reloc-overflow.o
# SECOVERFLOW-NEXT: Format: aixcoff-rs6000
# SECOVERFLOW-NEXT: Arch: powerpc
# SECOVERFLOW-NEXT: AddressSize: 32bit
diff --git a/llvm/test/tools/llvm-readobj/COFF/reloc_overflow.test b/llvm/test/tools/llvm-readobj/XCOFF/reloc_overflow.test
similarity index 93%
rename from llvm/test/tools/llvm-readobj/COFF/reloc_overflow.test
rename to llvm/test/tools/llvm-readobj/XCOFF/reloc_overflow.test
index accb9e0ab55b3..eb32a997adf8a 100644
--- a/llvm/test/tools/llvm-readobj/COFF/reloc_overflow.test
+++ b/llvm/test/tools/llvm-readobj/XCOFF/reloc_overflow.test
@@ -1,10 +1,10 @@
-# RUN: llvm-readobj --sections %p/Inputs/xcoff-reloc-overflow.o | \
+# RUN: llvm-readobj --sections %p/Inputs/reloc-overflow.o | \
# RUN: FileCheck --check-prefix=SECOVERFLOW %s
-# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/xcoff-reloc-overflow.o | \
+# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/reloc-overflow.o | \
# RUN: FileCheck --check-prefix=RELOCOVERFLOW %s
-# SECOVERFLOW: File: {{.*}}xcoff-reloc-overflow.o
+# SECOVERFLOW: File: {{.*}}reloc-overflow.o
# SECOVERFLOW-NEXT: Format: aixcoff-rs6000
# SECOVERFLOW-NEXT: Arch: powerpc
# SECOVERFLOW-NEXT: AddressSize: 32bit
diff --git a/llvm/test/tools/llvm-readobj/COFF/xcoff-sections.test b/llvm/test/tools/llvm-readobj/XCOFF/sections.test
similarity index 96%
rename from llvm/test/tools/llvm-readobj/COFF/xcoff-sections.test
rename to llvm/test/tools/llvm-readobj/XCOFF/sections.test
index d80f9d8e3442d..b0d5436e0baba 100644
--- a/llvm/test/tools/llvm-readobj/COFF/xcoff-sections.test
+++ b/llvm/test/tools/llvm-readobj/XCOFF/sections.test
@@ -1,10 +1,10 @@
-# RUN: llvm-readobj --section-headers %p/Inputs/xcoff-basic.o | \
+# RUN: llvm-readobj --section-headers %p/Inputs/basic.o | \
# RUN: FileCheck --check-prefix=SEC32 %s
-# RUN: llvm-readobj --section-headers %p/Inputs/xcoff-basic-64.o | \
+# RUN: llvm-readobj --section-headers %p/Inputs/basic64.o | \
# RUN: FileCheck --check-prefix=SEC64 %s
-# SEC32: File: {{.*}}xcoff-basic.o
+# SEC32: File: {{.*}}basic.o
# SEC32-NEXT: Format: aixcoff-rs6000
# SEC32-NEXT: Arch: powerpc
# SEC32-NEXT: AddressSize: 32bit
@@ -90,7 +90,7 @@
# SEC32-NEXT: ]
-# SEC64: File: {{.*}}xcoff-basic-64.o
+# SEC64: File: {{.*}}basic64.o
# SEC64-NEXT: Format: aix5coff64-rs6000
# SEC64-NEXT: Arch: powerpc64
# SEC64-NEXT: AddressSize: 64bit
diff --git a/llvm/test/tools/llvm-readobj/COFF/xcoff-symbols.test b/llvm/test/tools/llvm-readobj/XCOFF/symbols.test
similarity index 99%
rename from llvm/test/tools/llvm-readobj/COFF/xcoff-symbols.test
rename to llvm/test/tools/llvm-readobj/XCOFF/symbols.test
index 15de3dba21b17..6aef3ee31338b 100644
--- a/llvm/test/tools/llvm-readobj/COFF/xcoff-symbols.test
+++ b/llvm/test/tools/llvm-readobj/XCOFF/symbols.test
@@ -1,9 +1,34 @@
# This file tests the ability of llvm-readobj to display the symbol table for a
# 32-bit XCOFF object file.
-RUN: llvm-readobj --symbols %p/Inputs/aix_xcoff_xlc_test8.o | \
+# The object file used is generated by the following source file
+# and command on AIX:
+#
+# > cat test8.c
+#
+# extern int i;
+# extern int TestforXcoff;
+# extern int fun(int i);
+# static int static_i;
+# char* p="abcd";
+# int fun1(int j) {
+# static_i++;
+# j++;
+# j=j+*p;
+# return j;
+# }
+#
+# int main() {
+# i++;
+# fun(i);
+# return fun1(i);
+# }
+#
+# > xlc -c test8.c -o symbol.o
+
+RUN: llvm-readobj --symbols %p/Inputs/symbol.o | \
RUN: FileCheck --check-prefix=SYMBOL32 %s
-SYMBOL32: File: {{.*}}aix_xcoff_xlc_test8.o
+SYMBOL32: File: {{.*}}symbol.o
SYMBOL32-NEXT: Format: aixcoff-rs6000
SYMBOL32-NEXT: Arch: powerpc
SYMBOL32-NEXT: AddressSize: 32bit
@@ -419,28 +444,3 @@ SYMBOL32-NEXT: StabSectNum: 0x0
SYMBOL32-NEXT: }
SYMBOL32-NEXT: }
SYMBOL32-NEXT: ]
-
-# The object file used is generated by the following source file
-# and command on AIX:
-#
-# > cat test8.c
-#
-# extern int i;
-# extern int TestforXcoff;
-# extern int fun(int i);
-# static int static_i;
-# char* p="abcd";
-# int fun1(int j) {
-# static_i++;
-# j++;
-# j=j+*p;
-# return j;
-# }
-#
-# int main() {
-# i++;
-# fun(i);
-# return fun1(i);
-# }
-#
-# > xlc -c test8.c -o aix_xcoff_xlc_test8.o
More information about the llvm-commits
mailing list