[llvm] r361626 - [llvm-readobj][mips] Align GOT columns headers properly in 64-bit case
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 03:26:49 PDT 2019
Author: atanasyan
Date: Fri May 24 03:26:48 2019
New Revision: 361626
URL: http://llvm.org/viewvc/llvm-project?rev=361626&view=rev
Log:
[llvm-readobj][mips] Align GOT columns headers properly in 64-bit case
Modified:
llvm/trunk/test/tools/llvm-readobj/mips-got.test
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
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=361626&r1=361625&r2=361626&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-got.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-got.test Fri May 24 03:26:48 2019
@@ -14,15 +14,15 @@ RUN: FileCheck %s -check-prefix GOT-ST
RUN: not llvm-readelf --mips-plt-got %p/Inputs/relocs.obj.elf-mips 2>&1 | \
RUN: FileCheck %s -check-prefix GNU-GOT-OBJ
RUN: llvm-readelf --mips-plt-got %p/Inputs/dynamic-table-exe.mips | \
-RUN: FileCheck %s -check-prefix GNU-GOT-EXE
+RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EXE
RUN: llvm-readelf --mips-plt-got %p/Inputs/dynamic-table-so.mips | \
-RUN: FileCheck %s -check-prefix GNU-GOT-SO
+RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-SO
RUN: llvm-readelf --mips-plt-got %p/Inputs/got-tls.so.elf-mips64el | \
-RUN: FileCheck %s -check-prefix GNU-GOT-TLS
+RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-TLS
RUN: llvm-readelf --mips-plt-got %p/Inputs/got-empty.exe.mipsel | \
-RUN: FileCheck %s -check-prefix GNU-GOT-EMPTY
+RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-EMPTY
RUN: llvm-readelf --mips-plt-got %p/Inputs/got-static.exe.mips | \
-RUN: FileCheck %s -check-prefix GNU-GOT-STATIC
+RUN: FileCheck %s --strict-whitespace -check-prefix GNU-GOT-STATIC
GOT-OBJ: error: Cannot find .got section
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=361626&r1=361625&r2=361626&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Fri May 24 03:26:48 2019
@@ -4061,7 +4061,10 @@ void GNUStyle<ELFT>::printMipsGOT(const
<< format_hex_no_prefix(Parser.getGp(), 8 + Bias) << "\n\n";
OS << " Reserved entries:\n";
- OS << " Address Access Initial Purpose\n";
+ if (ELFT::Is64Bits)
+ OS << " Address Access Initial Purpose\n";
+ else
+ OS << " Address Access Initial Purpose\n";
PrintEntry(Parser.getGotLazyResolver(), "Lazy resolver");
if (Parser.getGotModulePointer())
PrintEntry(Parser.getGotModulePointer(), "Module pointer (GNU extension)");
@@ -4069,7 +4072,10 @@ void GNUStyle<ELFT>::printMipsGOT(const
if (!Parser.getLocalEntries().empty()) {
OS << "\n";
OS << " Local entries:\n";
- OS << " Address Access Initial\n";
+ if (ELFT::Is64Bits)
+ OS << " Address Access Initial\n";
+ else
+ OS << " Address Access Initial\n";
for (auto &E : Parser.getLocalEntries())
PrintEntry(&E, "");
}
@@ -4080,7 +4086,11 @@ void GNUStyle<ELFT>::printMipsGOT(const
if (!Parser.getGlobalEntries().empty()) {
OS << "\n";
OS << " Global entries:\n";
- OS << " Address Access Initial Sym.Val. Type Ndx Name\n";
+ if (ELFT::Is64Bits)
+ OS << " Address Access Initial Sym.Val."
+ << " Type Ndx Name\n";
+ else
+ OS << " Address Access Initial Sym.Val. Type Ndx Name\n";
for (auto &E : Parser.getGlobalEntries()) {
const Elf_Sym *Sym = Parser.getGotSym(&E);
std::string SymName = this->dumper()->getFullSymbolName(
More information about the llvm-commits
mailing list