[llvm] r373588 - [llvm-readobj][mips] Display MIPS specific info under --arch-specific flag
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 05:07:07 PDT 2019
Author: atanasyan
Date: Thu Oct 3 05:07:07 2019
New Revision: 373588
URL: http://llvm.org/viewvc/llvm-project?rev=373588&view=rev
Log:
[llvm-readobj][mips] Display MIPS specific info under --arch-specific flag
Old options `--mips-plt-got`, `--mips-abi-flags`, '--mips-reginfo`,
and `--mips-options` wiil be deleted in a separate patch.
Modified:
llvm/trunk/test/tools/llvm-readobj/mips-got-overlapped.test
llvm/trunk/test/tools/llvm-readobj/mips-got.test
llvm/trunk/test/tools/llvm-readobj/mips-options-sec.test
llvm/trunk/test/tools/llvm-readobj/mips-plt.test
llvm/trunk/test/tools/llvm-readobj/mips-reginfo.test
llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
Modified: llvm/trunk/test/tools/llvm-readobj/mips-got-overlapped.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-got-overlapped.test?rev=373588&r1=373587&r2=373588&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-got-overlapped.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-got-overlapped.test Thu Oct 3 05:07:07 2019
@@ -1,9 +1,9 @@
-# Check that llvm-readobj --mips-plt-got correctly shows .got section
+# Check that llvm-readobj -A correctly shows .got section
# content if there are some other zero-sized sections with the same
# address as the .got. got-over.exe.elf-mips has zero-sized .data
# section at the same offset .got section.
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-over.exe.elf-mips | FileCheck %s
+RUN: llvm-readobj -A %p/Inputs/got-over.exe.elf-mips | FileCheck %s
GOT-OBJ: Cannot find PLTGOT dynamic table tag.
Modified: llvm/trunk/test/tools/llvm-readobj/mips-got.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-got.test?rev=373588&r1=373587&r2=373588&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-got.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-got.test Thu Oct 3 05:07:07 2019
@@ -1,23 +1,23 @@
-RUN: llvm-readobj --mips-plt-got %p/Inputs/dynamic-table-exe.mips | \
+RUN: llvm-readobj -A %p/Inputs/dynamic-table-exe.mips | \
RUN: FileCheck %s -check-prefix GOT-EXE
-RUN: llvm-readobj --mips-plt-got %p/Inputs/dynamic-table-so.mips | \
+RUN: llvm-readobj -A %p/Inputs/dynamic-table-so.mips | \
RUN: FileCheck %s -check-prefix GOT-SO
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-tls.so.elf-mips64el | \
+RUN: llvm-readobj -A %p/Inputs/got-tls.so.elf-mips64el | \
RUN: FileCheck %s -check-prefix GOT-TLS
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-empty.exe.mipsel | \
+RUN: llvm-readobj -A %p/Inputs/got-empty.exe.mipsel | \
RUN: FileCheck %s -check-prefix GOT-EMPTY
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-static.exe.mips | \
+RUN: llvm-readobj -A %p/Inputs/got-static.exe.mips | \
RUN: FileCheck %s -check-prefix GOT-STATIC
-RUN: llvm-readelf --mips-plt-got %p/Inputs/dynamic-table-exe.mips | \
+RUN: llvm-readelf -A %p/Inputs/dynamic-table-exe.mips | \
RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EXE
-RUN: llvm-readelf --mips-plt-got %p/Inputs/dynamic-table-so.mips | \
+RUN: llvm-readelf -A %p/Inputs/dynamic-table-so.mips | \
RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-SO
-RUN: llvm-readelf --mips-plt-got %p/Inputs/got-tls.so.elf-mips64el | \
+RUN: llvm-readelf -A %p/Inputs/got-tls.so.elf-mips64el | \
RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-TLS
-RUN: llvm-readelf --mips-plt-got %p/Inputs/got-empty.exe.mipsel | \
+RUN: llvm-readelf -A %p/Inputs/got-empty.exe.mipsel | \
RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EMPTY
-RUN: llvm-readelf --mips-plt-got %p/Inputs/got-static.exe.mips | \
+RUN: llvm-readelf -A %p/Inputs/got-static.exe.mips | \
RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-STATIC
GOT-EXE: Primary GOT {
Modified: llvm/trunk/test/tools/llvm-readobj/mips-options-sec.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-options-sec.test?rev=373588&r1=373587&r2=373588&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-options-sec.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-options-sec.test Thu Oct 3 05:07:07 2019
@@ -1,4 +1,4 @@
-RUN: llvm-readobj --mips-options %p/Inputs/options.obj.elf-mipsel | FileCheck %s
+RUN: llvm-readobj -A %p/Inputs/options.obj.elf-mipsel | FileCheck %s
CHECK: MIPS Options {
CHECK-NEXT: ODK_REGINFO {
Modified: llvm/trunk/test/tools/llvm-readobj/mips-plt.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-plt.test?rev=373588&r1=373587&r2=373588&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-plt.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-plt.test Thu Oct 3 05:07:07 2019
@@ -1,5 +1,5 @@
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-plt.exe.elf-mipsel | FileCheck %s
-RUN: llvm-readelf --mips-plt-got %p/Inputs/got-plt.exe.elf-mipsel | FileCheck --check-prefix=GNU %s
+RUN: llvm-readobj -A %p/Inputs/got-plt.exe.elf-mipsel | FileCheck %s
+RUN: llvm-readelf -A %p/Inputs/got-plt.exe.elf-mipsel | FileCheck --check-prefix=GNU %s
CHECK: PLT GOT {
CHECK-NEXT: Reserved entries [
Modified: llvm/trunk/test/tools/llvm-readobj/mips-reginfo.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-reginfo.test?rev=373588&r1=373587&r2=373588&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-reginfo.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-reginfo.test Thu Oct 3 05:07:07 2019
@@ -1,4 +1,4 @@
-RUN: llvm-readobj --mips-reginfo %p/Inputs/reginfo.obj.elf-mipsel | FileCheck %s
+RUN: llvm-readobj -A %p/Inputs/reginfo.obj.elf-mipsel | FileCheck %s
CHECK: MIPS RegInfo {
CHECK-NEXT: GP: 0x7FEF
Modified: llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp?rev=373588&r1=373587&r2=373588&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp Thu Oct 3 05:07:07 2019
@@ -519,9 +519,16 @@ static void dumpObject(const ObjectFile
if (Obj->isELF()) {
if (opts::ELFLinkerOptions)
Dumper->printELFLinkerOptions();
- if (opts::ArchSpecificInfo)
+ if (opts::ArchSpecificInfo) {
if (Obj->getArch() == llvm::Triple::arm)
Dumper->printAttributes();
+ else if (isMipsArch(Obj->getArch())) {
+ Dumper->printMipsABIFlags();
+ Dumper->printMipsOptions();
+ Dumper->printMipsReginfo();
+ Dumper->printMipsPLTGOT();
+ }
+ }
if (isMipsArch(Obj->getArch())) {
if (opts::MipsPLTGOT)
Dumper->printMipsPLTGOT();
More information about the llvm-commits
mailing list