]> granicus.if.org Git - llvm/commitdiff
[llvm-readobj] Support SHT_MIPS_DWARF section type flag
authorSimon Atanasyan <simon@atanasyan.com>
Fri, 10 Mar 2017 08:22:25 +0000 (08:22 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Fri, 10 Mar 2017 08:22:25 +0000 (08:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297448 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/Mips/elf-debug-section.s [new file with mode: 0644]
tools/llvm-readobj/ELFDumper.cpp

diff --git a/test/MC/Mips/elf-debug-section.s b/test/MC/Mips/elf-debug-section.s
new file mode 100644 (file)
index 0000000..6cc901b
--- /dev/null
@@ -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)
index 2ebe44bdcfe97032329e2f0b218daf5dccb121eb..4ab3d303ce093703c67834b0b361e1032d360569 100644 (file)
@@ -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) {