[llvm] r375095 - [llvm-readobj] - Refine the LLVM-style output to be consistent.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 03:23:48 PDT 2019
Author: grimar
Date: Thu Oct 17 03:23:48 2019
New Revision: 375095
URL: http://llvm.org/viewvc/llvm-project?rev=375095&view=rev
Log:
[llvm-readobj] - Refine the LLVM-style output to be consistent.
Our LLVM-style output was inconsistent.
This patch changes the output in the following way:
SHT_GNU_verdef { -> VersionDefinitions [
SHT_GNU_verneed { -> VersionRequirements [
Version symbols [ -> VersionSymbols [
EH_FRAME Header [ -> EHFrameHeader {
Differential revision: https://reviews.llvm.org/D68636
Modified:
llvm/trunk/test/Object/multiple-sections.yaml
llvm/trunk/test/tools/llvm-readobj/all.test
llvm/trunk/test/tools/llvm-readobj/elf-verneed-flags.yaml
llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
llvm/trunk/test/tools/llvm-readobj/unwind.test
llvm/trunk/test/tools/yaml2obj/verdef-section.yaml
llvm/trunk/test/tools/yaml2obj/verneed-section.yaml
llvm/trunk/test/tools/yaml2obj/versym-section.yaml
llvm/trunk/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Modified: llvm/trunk/test/Object/multiple-sections.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/multiple-sections.yaml?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/Object/multiple-sections.yaml (original)
+++ llvm/trunk/test/Object/multiple-sections.yaml Thu Oct 17 03:23:48 2019
@@ -4,8 +4,8 @@
# Test that multiple sections with the same type does not trigger an error.
# CHECK: ElfHeader {
-# CHECK: SHT_GNU_verdef {
-# CHECK: SHT_GNU_verneed {
+# CHECK: VersionDefinitions [
+# CHECK: VersionRequirements [
# CHECK: CGProfile [
# CHECK: Addrsig [
Modified: llvm/trunk/test/tools/llvm-readobj/all.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/all.test?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/all.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/all.test Thu Oct 17 03:23:48 2019
@@ -10,10 +10,12 @@
# LLVM-ALL: Sections [
# LLVM-ALL: Relocations [
# LLVM-ALL: Symbols [
+# LLVM-ALL: EHFrameHeader {
+# LLVM-ALL: .eh_frame section at offset 0x1128 address 0x0:
# LLVM-ALL: ProgramHeaders [
-# LLVM-ALL: Version symbols [
-# LLVM-ALL: SHT_GNU_verdef {
-# LLVM-ALL: SHT_GNU_verneed {
+# LLVM-ALL: VersionSymbols [
+# LLVM-ALL: VersionDefinitions [
+# LLVM-ALL: VersionRequirements [
# LLVM-ALL: Addrsig [
# LLVM-ALL: Notes [
# LLVM-ALL: StackSizes [
@@ -25,7 +27,7 @@
# GNU-ALL: There are {{.*}} section headers, starting at offset {{.*}}:
# GNU-ALL: Relocation section '.rela.data' at offset {{.*}} contains {{.*}} entries:
# GNU-ALL: Symbol table '.symtab' contains {{.*}} entries:
-# GNU-ALL: EH_FRAME Header [
+# GNU-ALL: EHFrameHeader {
# GNU-ALL: .eh_frame section at offset {{.*}} address 0x0:
# GNU-ALL: Dynamic section at offset {{.*}} contains {{.*}} entries:
# GNU-ALL: Program Headers:
Modified: llvm/trunk/test/tools/llvm-readobj/elf-verneed-flags.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-verneed-flags.yaml?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-verneed-flags.yaml (original)
+++ llvm/trunk/test/tools/llvm-readobj/elf-verneed-flags.yaml Thu Oct 17 03:23:48 2019
@@ -5,7 +5,7 @@
# RUN: llvm-readobj -V %t | FileCheck %s --check-prefix=LLVM-VERDEF
# RUN: llvm-readelf -V %t | FileCheck %s --check-prefix=GNU-VERDEF
-# LLVM-VERDEF: SHT_GNU_verneed {
+# LLVM-VERDEF: VersionRequirements [
# LLVM-VERDEF-NEXT: Dependency {
# LLVM-VERDEF-NEXT: Version: 1
# LLVM-VERDEF-NEXT: Count: 6
@@ -49,7 +49,7 @@
# LLVM-VERDEF-NEXT: }
# LLVM-VERDEF-NEXT: ]
# LLVM-VERDEF-NEXT: }
-# LLVM-VERDEF-NEXT: }
+# LLVM-VERDEF-NEXT: ]
# GNU-VERDEF: Version needs section '.gnu.version_r' contains 1 entries:
# GNU-VERDEF-NEXT: Addr: 0000000000000000 Offset: 0x000200 Link: 6 (.dynstr)
Modified: llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test Thu Oct 17 03:23:48 2019
@@ -77,7 +77,7 @@ DynamicSymbols:
Binding: STB_GLOBAL
...
-# LLVM: Version symbols [
+# LLVM: VersionSymbols [
# LLVM-NEXT: Symbol {
# LLVM-NEXT: Version: 0
# LLVM-NEXT: Name:
@@ -103,7 +103,7 @@ DynamicSymbols:
# LLVM-NEXT: Name: sym5 at v3
# LLVM-NEXT: }
# LLVM-NEXT: ]
-# LLVM-NEXT: SHT_GNU_verdef {
+# LLVM-NEXT: VersionDefinitions [
# LLVM-NEXT: Definition {
# LLVM-NEXT: Version: 1
# LLVM-NEXT: Flags: 0x0
@@ -127,8 +127,8 @@ DynamicSymbols:
# LLVM-NEXT: Name: VERSION2
# LLVM-NEXT: Predecessor: VERSION1
# LLVM-NEXT: }
-# LLVM-NEXT: }
-# LLVM-NEXT: SHT_GNU_verneed {
+# LLVM-NEXT: ]
+# LLVM-NEXT: VersionRequirements [
# LLVM-NEXT: Dependency {
# LLVM-NEXT: Version: 1
# LLVM-NEXT: Count: 2
@@ -161,7 +161,7 @@ DynamicSymbols:
# LLVM-NEXT: }
# LLVM-NEXT: ]
# LLVM-NEXT: }
-# LLVM-NEXT: }
+# LLVM-NEXT: ]
# GNU: Version symbols section '.gnu.version' contains 6 entries:
# GNU-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 7 (.dynsym)
Modified: llvm/trunk/test/tools/llvm-readobj/unwind.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/unwind.test?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/unwind.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/unwind.test Thu Oct 17 03:23:48 2019
@@ -1,7 +1,7 @@
# RUN: yaml2obj %s > %t.exe
# RUN: llvm-readobj --unwind %t.exe | FileCheck %s
-# CHECK: EH_FRAME Header [
+# CHECK: EHFrameHeader {
# CHECK-NEXT: Address: 0x4013c0
# CHECK-NEXT: Offset: 0xbc
# CHECK-NEXT: Size: 0x3c
@@ -38,7 +38,7 @@
# CHECK-NEXT: address: 0x4014f0
# CHECK-NEXT: }
# CHECK-NEXT: }
-# CHECK-NEXT:]
+# CHECK-NEXT:}
# CHECK: .eh_frame section at offset 0xf8 address 0x401400:
# CHECK-NEXT: [0x401400] CIE length=20
Modified: llvm/trunk/test/tools/yaml2obj/verdef-section.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/verdef-section.yaml?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/tools/yaml2obj/verdef-section.yaml (original)
+++ llvm/trunk/test/tools/yaml2obj/verdef-section.yaml Thu Oct 17 03:23:48 2019
@@ -3,7 +3,7 @@
# Check we are able to handle the SHT_GNU_verdef sections.
-# CHECK: SHT_GNU_verdef {
+# CHECK: VersionDefinitions [
# CHECK-NEXT: Definition {
# CHECK-NEXT: Version: 1
# CHECK-NEXT: Flags: Base
@@ -26,7 +26,7 @@
# CHECK-NEXT: Name: VERSION_2
# CHECK-NEXT: Predecessor: VERSION_3
# CHECK-NEXT: }
-# CHECK-NEXT: }
+# CHECK-NEXT: ]
--- !ELF
FileHeader:
Modified: llvm/trunk/test/tools/yaml2obj/verneed-section.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/verneed-section.yaml?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/tools/yaml2obj/verneed-section.yaml (original)
+++ llvm/trunk/test/tools/yaml2obj/verneed-section.yaml Thu Oct 17 03:23:48 2019
@@ -3,7 +3,7 @@
# Check we are able to handle the SHT_GNU_verneed sections.
-# CHECK: SHT_GNU_verneed {
+# CHECK: VersionRequirements [
# CHECK-NEXT: Dependency {
# CHECK-NEXT: Version: 1
# CHECK-NEXT: Count: 2
@@ -36,7 +36,7 @@
# CHECK-NEXT: }
# CHECK-NEXT: ]
# CHECK-NEXT: }
-# CHECK-NEXT: }
+# CHECK-NEXT: ]
--- !ELF
FileHeader:
Modified: llvm/trunk/test/tools/yaml2obj/versym-section.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/versym-section.yaml?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/test/tools/yaml2obj/versym-section.yaml (original)
+++ llvm/trunk/test/tools/yaml2obj/versym-section.yaml Thu Oct 17 03:23:48 2019
@@ -4,7 +4,7 @@
# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-readobj -V %t1 | FileCheck %s
-# CHECK: Version symbols [
+# CHECK: VersionSymbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Version: 0
# CHECK-NEXT: Name:
@@ -18,9 +18,9 @@
# CHECK-NEXT: Name: f2 at v2
# CHECK-NEXT: }
# CHECK-NEXT: ]
-# CHECK-NEXT: SHT_GNU_verdef {
-# CHECK-NEXT: }
-# CHECK-NEXT: SHT_GNU_verneed {
+# CHECK-NEXT: VersionDefinitions [
+# CHECK-NEXT: ]
+# CHECK-NEXT: VersionRequirements [
# CHECK-NEXT: Dependency {
# CHECK-NEXT: Version: 1
# CHECK-NEXT: Count: 2
@@ -40,7 +40,7 @@
# CHECK-NEXT: }
# CHECK-NEXT: ]
# CHECK-NEXT: }
-# CHECK-NEXT: }
+# CHECK-NEXT: ]
--- !ELF
FileHeader:
Modified: llvm/trunk/tools/llvm-readobj/DwarfCFIEHPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/DwarfCFIEHPrinter.h?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/DwarfCFIEHPrinter.h (original)
+++ llvm/trunk/tools/llvm-readobj/DwarfCFIEHPrinter.h Thu Oct 17 03:23:48 2019
@@ -99,7 +99,7 @@ template <typename ELFT>
void PrinterContext<ELFT>::printEHFrameHdr(uint64_t EHFrameHdrOffset,
uint64_t EHFrameHdrAddress,
uint64_t EHFrameHdrSize) const {
- ListScope L(W, "EH_FRAME Header");
+ DictScope L(W, "EHFrameHeader");
W.startLine() << format("Address: 0x%" PRIx64 "\n", EHFrameHdrAddress);
W.startLine() << format("Offset: 0x%" PRIx64 "\n", EHFrameHdrOffset);
W.startLine() << format("Size: 0x%" PRIx64 "\n", EHFrameHdrSize);
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=375095&r1=375094&r2=375095&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Thu Oct 17 03:23:48 2019
@@ -5607,7 +5607,7 @@ void LLVMStyle<ELFT>::printProgramHeader
template <class ELFT>
void LLVMStyle<ELFT>::printVersionSymbolSection(const ELFFile<ELFT> *Obj,
const Elf_Shdr *Sec) {
- ListScope SS(W, "Version symbols");
+ ListScope SS(W, "VersionSymbols");
if (!Sec)
return;
@@ -5631,7 +5631,7 @@ void LLVMStyle<ELFT>::printVersionSymbol
template <class ELFT>
void LLVMStyle<ELFT>::printVersionDefinitionSection(const ELFFile<ELFT> *Obj,
const Elf_Shdr *Sec) {
- DictScope SD(W, "SHT_GNU_verdef");
+ ListScope SD(W, "VersionDefinitions");
if (!Sec)
return;
@@ -5679,7 +5679,7 @@ void LLVMStyle<ELFT>::printVersionDefini
template <class ELFT>
void LLVMStyle<ELFT>::printVersionDependencySection(const ELFFile<ELFT> *Obj,
const Elf_Shdr *Sec) {
- DictScope SD(W, "SHT_GNU_verneed");
+ ListScope SD(W, "VersionRequirements");
if (!Sec)
return;
More information about the llvm-commits
mailing list