summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-26 21:30:59 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-26 21:30:59 +0000
commit9ae2d05d45f76a86fe220d2f39fe0a042dfc97fa (patch)
tree120b386cbb3aedc3a3e025c27804e3d7bb7b0df1 /llvm/lib
parent7c5f9c35d1afd65c80369803dc5f65309dc361ce (diff)
downloadbcm5719-llvm-9ae2d05d45f76a86fe220d2f39fe0a042dfc97fa.tar.gz
bcm5719-llvm-9ae2d05d45f76a86fe220d2f39fe0a042dfc97fa.zip
Add support for @note. Patch by Jörg Sonnenberger.
llvm-svn: 122568
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp1
-rw-r--r--llvm/lib/MC/MCParser/ELFAsmParser.cpp2
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp2
3 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index ef6e0f14141..5ff12bc01f0 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -1265,6 +1265,7 @@ void ELFObjectWriter::WriteSection(MCAssembler &Asm,
case ELF::SHT_PROGBITS:
case ELF::SHT_STRTAB:
case ELF::SHT_NOBITS:
+ case ELF::SHT_NOTE:
case ELF::SHT_NULL:
case ELF::SHT_ARM_ATTRIBUTES:
// Nothing to do.
diff --git a/llvm/lib/MC/MCParser/ELFAsmParser.cpp b/llvm/lib/MC/MCParser/ELFAsmParser.cpp
index 0aa89c20a2f..0456b4bac4c 100644
--- a/llvm/lib/MC/MCParser/ELFAsmParser.cpp
+++ b/llvm/lib/MC/MCParser/ELFAsmParser.cpp
@@ -335,6 +335,8 @@ bool ELFAsmParser::ParseDirectiveSection(StringRef, SMLoc) {
Type = MCSectionELF::SHT_NOBITS;
else if (TypeName == "progbits")
Type = MCSectionELF::SHT_PROGBITS;
+ else if (TypeName == "note")
+ Type = MCSectionELF::SHT_NOTE;
else
return TokError("unknown section type");
}
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index 59568adf708..a53489790d2 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -92,6 +92,8 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
OS << "preinit_array";
else if (Type == MCSectionELF::SHT_NOBITS)
OS << "nobits";
+ else if (Type == MCSectionELF::SHT_NOTE)
+ OS << "note";
else if (Type == MCSectionELF::SHT_PROGBITS)
OS << "progbits";
OpenPOWER on IntegriCloud