aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2017-03-10 08:22:20 +0000
committerSimon Atanasyan <simon@atanasyan.com>2017-03-10 08:22:20 +0000
commitec8dfb1ca78af5b5e8d7a3003b0560d422d21a10 (patch)
tree513c0f15010e0234d5e89b607b7fc0b962c09d2b /llvm/lib/MC/MCSectionELF.cpp
parent2953224d644236783d4f2487b9777803cc5e7111 (diff)
downloadllvm-ec8dfb1ca78af5b5e8d7a3003b0560d422d21a10.zip
llvm-ec8dfb1ca78af5b5e8d7a3003b0560d422d21a10.tar.gz
llvm-ec8dfb1ca78af5b5e8d7a3003b0560d422d21a10.tar.bz2
[MC] Set SHT_MIPS_DWARF section type for all .debug_* sections on MIPS
All MIPS .debug_* sections should be marked with ELF type SHT_MIPS_DWARF accordingly the specification [1]. Also the same section type is assigned to these sections by GNU tools. [1] ftp.software.ibm.com/software/os390/czos/dwarf/mips_extensions.pdf Differential Revision: https://reviews.llvm.org/D29789 llvm-svn: 297447
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index c73fafe..a352f84c 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -141,6 +141,10 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
OS << "progbits";
else if (Type == ELF::SHT_X86_64_UNWIND)
OS << "unwind";
+ else if (Type == ELF::SHT_MIPS_DWARF)
+ // Print hex value of the flag while we do not have
+ // any standard symbolic representation of the flag.
+ OS << "0x7000001e";
else
report_fatal_error("unsupported type 0x" + Twine::utohexstr(Type) +
" for section " + getSectionName());