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 | 31a8a8c2a44d05f0f6d79f2ff57eb06ed02f6952 (patch) | |
| tree | ea63876bdc098ebb13f7515a5755b711a0f4f4d0 | |
| parent | 7e105d8389347468aaa57d612d4d20c0168464ec (diff) | |
| download | external_llvm-31a8a8c2a44d05f0f6d79f2ff57eb06ed02f6952.zip external_llvm-31a8a8c2a44d05f0f6d79f2ff57eb06ed02f6952.tar.gz external_llvm-31a8a8c2a44d05f0f6d79f2ff57eb06ed02f6952.tar.bz2 | |
Only use small sections for non linux targets!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89316 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | lib/Target/Mips/MipsTargetObjectFile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsTargetObjectFile.cpp b/lib/Target/Mips/MipsTargetObjectFile.cpp index 85e9d65..0fb423d 100644 --- a/lib/Target/Mips/MipsTargetObjectFile.cpp +++ b/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) |
