Tie small stuff to non-small by default on ELF platforms
llvm-svn: 53919
This commit is contained in:
parent
85b898e1de
commit
4a4484ee97
|
@ -40,8 +40,8 @@ namespace llvm {
|
||||||
RODataMergeStr, ///< Readonly data section (mergeable strings)
|
RODataMergeStr, ///< Readonly data section (mergeable strings)
|
||||||
RODataMergeConst, ///< Readonly data section (mergeable constants)
|
RODataMergeConst, ///< Readonly data section (mergeable constants)
|
||||||
SmallData, ///< Small data section
|
SmallData, ///< Small data section
|
||||||
SmallBSS, ///< Small bss section
|
SmallBSS, ///< Small bss section
|
||||||
SmallROData, ///< Small readonly section
|
SmallROData, ///< Small readonly section
|
||||||
ThreadData, ///< Initialized TLS data objects
|
ThreadData, ///< Initialized TLS data objects
|
||||||
ThreadBSS ///< Uninitialized TLS data objects
|
ThreadBSS ///< Uninitialized TLS data objects
|
||||||
};
|
};
|
||||||
|
@ -58,6 +58,7 @@ namespace llvm {
|
||||||
const unsigned TLS = 1 << 5; ///< Section contains thread-local data
|
const unsigned TLS = 1 << 5; ///< Section contains thread-local data
|
||||||
const unsigned Debug = 1 << 6; ///< Section contains debug data
|
const unsigned Debug = 1 << 6; ///< Section contains debug data
|
||||||
const unsigned Linkonce = 1 << 7; ///< Section is linkonce
|
const unsigned Linkonce = 1 << 7; ///< Section is linkonce
|
||||||
|
const unsigned Small = 1 << 8; ///< Section is small
|
||||||
const unsigned TypeFlags = 0xFF;
|
const unsigned TypeFlags = 0xFF;
|
||||||
// Some gap for future flags
|
// Some gap for future flags
|
||||||
const unsigned Named = 1 << 23; ///< Section is named
|
const unsigned Named = 1 << 23; ///< Section is named
|
||||||
|
|
|
@ -63,11 +63,14 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
|
||||||
} else {
|
} else {
|
||||||
switch (Kind) {
|
switch (Kind) {
|
||||||
case SectionKind::Data:
|
case SectionKind::Data:
|
||||||
|
case SectionKind::SmallData:
|
||||||
return getDataSection_();
|
return getDataSection_();
|
||||||
case SectionKind::BSS:
|
case SectionKind::BSS:
|
||||||
|
case SectionKind::SmallBSS:
|
||||||
// ELF targets usually have BSS sections
|
// ELF targets usually have BSS sections
|
||||||
return getBSSSection_();
|
return getBSSSection_();
|
||||||
case SectionKind::ROData:
|
case SectionKind::ROData:
|
||||||
|
case SectionKind::SmallROData:
|
||||||
return getReadOnlySection_();
|
return getReadOnlySection_();
|
||||||
case SectionKind::RODataMergeStr:
|
case SectionKind::RODataMergeStr:
|
||||||
return MergeableStringSection(GVar);
|
return MergeableStringSection(GVar);
|
||||||
|
@ -147,6 +150,8 @@ std::string ELFTargetAsmInfo::PrintSectionFlags(unsigned flags) const {
|
||||||
Flags += 'S';
|
Flags += 'S';
|
||||||
if (flags & SectionFlags::TLS)
|
if (flags & SectionFlags::TLS)
|
||||||
Flags += 'T';
|
Flags += 'T';
|
||||||
|
if (flags & SectionFlags::Small)
|
||||||
|
Flags += 's';
|
||||||
|
|
||||||
Flags += "\"";
|
Flags += "\"";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue