diff --git a/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-sym-count.o b/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-sym-count.o similarity index 100% rename from test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-sym-count.o rename to test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-sym-count.o diff --git a/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-time.o b/test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-time.o similarity index 100% rename from test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-neg-time.o rename to test/tools/llvm-readobj/XCOFF/Inputs/basic-neg-time.o diff --git a/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic.o b/test/tools/llvm-readobj/XCOFF/Inputs/basic.o similarity index 100% rename from test/tools/llvm-readobj/COFF/Inputs/xcoff-basic.o rename to test/tools/llvm-readobj/XCOFF/Inputs/basic.o diff --git a/test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-64.o b/test/tools/llvm-readobj/XCOFF/Inputs/basic64.o similarity index 100% rename from test/tools/llvm-readobj/COFF/Inputs/xcoff-basic-64.o rename to test/tools/llvm-readobj/XCOFF/Inputs/basic64.o diff --git a/test/tools/llvm-readobj/COFF/Inputs/xcoff-reloc-overflow.o b/test/tools/llvm-readobj/XCOFF/Inputs/reloc-overflow.o similarity index 100% rename from test/tools/llvm-readobj/COFF/Inputs/xcoff-reloc-overflow.o rename to test/tools/llvm-readobj/XCOFF/Inputs/reloc-overflow.o diff --git a/test/tools/llvm-readobj/COFF/Inputs/aix_xcoff_xlc_test8.o b/test/tools/llvm-readobj/XCOFF/Inputs/symbol.o similarity index 100% rename from test/tools/llvm-readobj/COFF/Inputs/aix_xcoff_xlc_test8.o rename to test/tools/llvm-readobj/XCOFF/Inputs/symbol.o diff --git a/test/tools/llvm-readobj/COFF/xcoff-basic.test b/test/tools/llvm-readobj/XCOFF/basic.test similarity index 89% rename from test/tools/llvm-readobj/COFF/xcoff-basic.test rename to test/tools/llvm-readobj/XCOFF/basic.test index 8219f20e53d..9d9917274e8 100644 --- a/test/tools/llvm-readobj/COFF/xcoff-basic.test +++ b/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/test/tools/llvm-readobj/COFF/xcoff-overflow-section.test b/test/tools/llvm-readobj/XCOFF/overflow-section.test similarity index 93% rename from test/tools/llvm-readobj/COFF/xcoff-overflow-section.test rename to test/tools/llvm-readobj/XCOFF/overflow-section.test index 8ff911b1d79..a3f026c801b 100644 --- a/test/tools/llvm-readobj/COFF/xcoff-overflow-section.test +++ b/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/test/tools/llvm-readobj/COFF/reloc_overflow.test b/test/tools/llvm-readobj/XCOFF/reloc_overflow.test similarity index 93% rename from test/tools/llvm-readobj/COFF/reloc_overflow.test rename to test/tools/llvm-readobj/XCOFF/reloc_overflow.test index accb9e0ab55..eb32a997adf 100644 --- a/test/tools/llvm-readobj/COFF/reloc_overflow.test +++ b/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/test/tools/llvm-readobj/COFF/xcoff-sections.test b/test/tools/llvm-readobj/XCOFF/sections.test similarity index 96% rename from test/tools/llvm-readobj/COFF/xcoff-sections.test rename to test/tools/llvm-readobj/XCOFF/sections.test index d80f9d8e344..b0d5436e0ba 100644 --- a/test/tools/llvm-readobj/COFF/xcoff-sections.test +++ b/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/test/tools/llvm-readobj/COFF/xcoff-symbols.test b/test/tools/llvm-readobj/XCOFF/symbols.test similarity index 99% rename from test/tools/llvm-readobj/COFF/xcoff-symbols.test rename to test/tools/llvm-readobj/XCOFF/symbols.test index 15de3dba21b..6aef3ee3133 100644 --- a/test/tools/llvm-readobj/COFF/xcoff-symbols.test +++ b/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