diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-11-19 05:28:18 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2009-11-19 05:28:18 +0000 |
commit | 8bd87239d714bc38b34cbb27a0f49fc3430b1122 (patch) | |
tree | e46503e474cd3cc93f23f3bed2faffa22b1f7294 /llvm/lib/Target/Mips/MipsTargetObjectFile.cpp | |
parent | 484afa2d3ba7fab61f925a1a329f959c616777f2 (diff) | |
download | bcm5719-llvm-8bd87239d714bc38b34cbb27a0f49fc3430b1122.tar.gz bcm5719-llvm-8bd87239d714bc38b34cbb27a0f49fc3430b1122.zip |
Only use small sections for non linux targets!
llvm-svn: 89316
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsTargetObjectFile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp b/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp index 85e9d65a32b..0fb423dc1b2 100644 --- a/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp +++ b/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "MipsTargetObjectFile.h" +#include "MipsSubtarget.h" #include "llvm/DerivedTypes.h" #include "llvm/GlobalVariable.h" #include "llvm/MC/MCSectionELF.h" @@ -56,6 +57,12 @@ bool MipsTargetObjectFile::IsGlobalInSmallSection(const GlobalValue *GV, bool MipsTargetObjectFile:: IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, SectionKind Kind) const { + + // Only use small section for non linux targets. + const MipsSubtarget &Subtarget = TM.getSubtarget<MipsSubtarget>(); + if (Subtarget.isLinux()) + return false; + // Only global variables, not functions. const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV); if (!GVA) |