diff --git a/llvm/test/Object/multiple-sections.yaml b/llvm/test/Object/multiple-sections.yaml --- a/llvm/test/Object/multiple-sections.yaml +++ b/llvm/test/Object/multiple-sections.yaml @@ -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 [ diff --git a/llvm/test/tools/llvm-readobj/all.test b/llvm/test/tools/llvm-readobj/all.test --- a/llvm/test/tools/llvm-readobj/all.test +++ b/llvm/test/tools/llvm-readobj/all.test @@ -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: diff --git a/llvm/test/tools/llvm-readobj/elf-verneed-flags.yaml b/llvm/test/tools/llvm-readobj/elf-verneed-flags.yaml --- a/llvm/test/tools/llvm-readobj/elf-verneed-flags.yaml +++ b/llvm/test/tools/llvm-readobj/elf-verneed-flags.yaml @@ -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) diff --git a/llvm/test/tools/llvm-readobj/elf-versioninfo.test b/llvm/test/tools/llvm-readobj/elf-versioninfo.test --- a/llvm/test/tools/llvm-readobj/elf-versioninfo.test +++ b/llvm/test/tools/llvm-readobj/elf-versioninfo.test @@ -77,7 +77,7 @@ Binding: STB_GLOBAL ... -# LLVM: Version symbols [ +# LLVM: VersionSymbols [ # LLVM-NEXT: Symbol { # LLVM-NEXT: Version: 0 # LLVM-NEXT: Name: @@ -103,7 +103,7 @@ # LLVM-NEXT: Name: sym5@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 @@ # 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 @@ # 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) diff --git a/llvm/test/tools/llvm-readobj/unwind.test b/llvm/test/tools/llvm-readobj/unwind.test --- a/llvm/test/tools/llvm-readobj/unwind.test +++ b/llvm/test/tools/llvm-readobj/unwind.test @@ -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 diff --git a/llvm/test/tools/yaml2obj/verdef-section.yaml b/llvm/test/tools/yaml2obj/verdef-section.yaml --- a/llvm/test/tools/yaml2obj/verdef-section.yaml +++ b/llvm/test/tools/yaml2obj/verdef-section.yaml @@ -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: diff --git a/llvm/test/tools/yaml2obj/verneed-section.yaml b/llvm/test/tools/yaml2obj/verneed-section.yaml --- a/llvm/test/tools/yaml2obj/verneed-section.yaml +++ b/llvm/test/tools/yaml2obj/verneed-section.yaml @@ -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: diff --git a/llvm/test/tools/yaml2obj/versym-section.yaml b/llvm/test/tools/yaml2obj/versym-section.yaml --- a/llvm/test/tools/yaml2obj/versym-section.yaml +++ b/llvm/test/tools/yaml2obj/versym-section.yaml @@ -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@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: diff --git a/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h b/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h --- a/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h +++ b/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h @@ -99,7 +99,7 @@ void PrinterContext::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); diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -5607,7 +5607,7 @@ template void LLVMStyle::printVersionSymbolSection(const ELFFile *Obj, const Elf_Shdr *Sec) { - ListScope SS(W, "Version symbols"); + ListScope SS(W, "VersionSymbols"); if (!Sec) return; @@ -5631,7 +5631,7 @@ template void LLVMStyle::printVersionDefinitionSection(const ELFFile *Obj, const Elf_Shdr *Sec) { - DictScope SD(W, "SHT_GNU_verdef"); + ListScope SD(W, "VersionDefinitions"); if (!Sec) return; @@ -5679,7 +5679,7 @@ template void LLVMStyle::printVersionDependencySection(const ELFFile *Obj, const Elf_Shdr *Sec) { - DictScope SD(W, "SHT_GNU_verneed"); + ListScope SD(W, "VersionRequirements"); if (!Sec) return;