aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ELFTargetAsmInfo.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-03-30 15:27:03 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-03-30 15:27:03 +0000
commit71a7c6cde01fb516f0cbdbd831e07cda063fed4e (patch)
tree2224a5df0b8360a3e760534e605d36f8b588ecf2 /lib/Target/ELFTargetAsmInfo.cpp
parent217b919cf951eed4012ac2daf1e494f4364aaec1 (diff)
Add data.rel stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ELFTargetAsmInfo.cpp')
-rw-r--r--lib/Target/ELFTargetAsmInfo.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp
index 3a2a00c658..8608d36747 100644
--- a/lib/Target/ELFTargetAsmInfo.cpp
+++ b/lib/Target/ELFTargetAsmInfo.cpp
@@ -35,6 +35,13 @@ ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM)
TLSBSSSection = getNamedSection("\t.tbss",
SectionFlags::Writeable | SectionFlags::TLS | SectionFlags::BSS);
+ DataRelSection = getNamedSection("\t.data.rel", SectionFlags::Writeable);
+ DataRelLocalSection = getNamedSection("\t.data.rel.local",
+ SectionFlags::Writeable);
+ DataRelROSection = getNamedSection("\t.data.rel.ro",
+ SectionFlags::Writeable);
+ DataRelROLocalSection = getNamedSection("\t.data.rel.ro.local",
+ SectionFlags::Writeable);
}
const Section*
@@ -67,6 +74,14 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
case SectionKind::Data:
case SectionKind::SmallData:
return DataSection;
+ case SectionKind::DataRel:
+ return DataRelSection;
+ case SectionKind::DataRelLocal:
+ return DataRelLocalSection;
+ case SectionKind::DataRelRO:
+ return DataRelROSection;
+ case SectionKind::DataRelROLocal:
+ return DataRelROLocalSection;
case SectionKind::BSS:
case SectionKind::SmallBSS:
// ELF targets usually have BSS sections