summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/MC/Mips/elf-debug-section.s6
-rw-r--r--llvm/tools/llvm-readobj/ELFDumper.cpp3
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/elf-debug-section.s b/llvm/test/MC/Mips/elf-debug-section.s
new file mode 100644
index 00000000000..6cc901bcb59
--- /dev/null
+++ b/llvm/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/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index 2ebe44bdcfe..4ab3d303ce0 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud