From: Simon Atanasyan Date: Fri, 10 Mar 2017 08:22:25 +0000 (+0000) Subject: [llvm-readobj] Support SHT_MIPS_DWARF section type flag X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f2078159d941394864193c0307b4c3a5b56b365;p=llvm [llvm-readobj] Support SHT_MIPS_DWARF section type flag git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297448 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/MC/Mips/elf-debug-section.s b/test/MC/Mips/elf-debug-section.s new file mode 100644 index 00000000000..6cc901bcb59 --- /dev/null +++ b/test/MC/Mips/elf-debug-section.s @@ -0,0 +1,6 @@ +# RUN: llvm-mc -filetype=obj -triple=mips-linux-gnu -g %s -o - \ +# RUN: | llvm-readobj -s | FileCheck %s + +# CHECK: Section { +# CHECK: Name: .debug_line +# CHECK-NEXT: Type: SHT_MIPS_DWARF (0x7000001E) diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index 2ebe44bdcfe..4ab3d303ce0 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -1003,6 +1003,7 @@ static const char *getElfSectionType(unsigned Arch, unsigned Type) { LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_REGINFO); LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_OPTIONS); LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_ABIFLAGS); + LLVM_READOBJ_ENUM_CASE(ELF, SHT_MIPS_DWARF); } } @@ -2627,6 +2628,8 @@ std::string getSectionTypeString(unsigned Arch, unsigned Type) { return "MIPS_OPTIONS"; case SHT_MIPS_ABIFLAGS: return "MIPS_ABIFLAGS"; + case SHT_MIPS_DWARF: + return "SHT_MIPS_DWARF"; } } switch (Type) {