[llvm-commits] [llvm] r53919 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/ELFTargetAsmInfo.cpp
Anton Korobeynikov
asl at math.spbu.ru
Tue Jul 22 10:09:41 PDT 2008
Author: asl
Date: Tue Jul 22 12:09:41 2008
New Revision: 53919
URL: http://llvm.org/viewvc/llvm-project?rev=53919&view=rev
Log:
Tie small stuff to non-small by default on ELF platforms
Modified:
llvm/trunk/include/llvm/Target/TargetAsmInfo.h
llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=53919&r1=53918&r2=53919&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Tue Jul 22 12:09:41 2008
@@ -40,8 +40,8 @@
RODataMergeStr, ///< Readonly data section (mergeable strings)
RODataMergeConst, ///< Readonly data section (mergeable constants)
SmallData, ///< Small data section
- SmallBSS, ///< Small bss section
- SmallROData, ///< Small readonly section
+ SmallBSS, ///< Small bss section
+ SmallROData, ///< Small readonly section
ThreadData, ///< Initialized TLS data objects
ThreadBSS ///< Uninitialized TLS data objects
};
@@ -58,6 +58,7 @@
const unsigned TLS = 1 << 5; ///< Section contains thread-local data
const unsigned Debug = 1 << 6; ///< Section contains debug data
const unsigned Linkonce = 1 << 7; ///< Section is linkonce
+ const unsigned Small = 1 << 8; ///< Section is small
const unsigned TypeFlags = 0xFF;
// Some gap for future flags
const unsigned Named = 1 << 23; ///< Section is named
Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=53919&r1=53918&r2=53919&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Tue Jul 22 12:09:41 2008
@@ -63,11 +63,14 @@
} else {
switch (Kind) {
case SectionKind::Data:
+ case SectionKind::SmallData:
return getDataSection_();
case SectionKind::BSS:
+ case SectionKind::SmallBSS:
// ELF targets usually have BSS sections
return getBSSSection_();
case SectionKind::ROData:
+ case SectionKind::SmallROData:
return getReadOnlySection_();
case SectionKind::RODataMergeStr:
return MergeableStringSection(GVar);
@@ -147,6 +150,8 @@
Flags += 'S';
if (flags & SectionFlags::TLS)
Flags += 'T';
+ if (flags & SectionFlags::Small)
+ Flags += 's';
Flags += "\"";
More information about the llvm-commits
mailing list