diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-11-18 06:02:15 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-11-18 06:02:15 +0000 |
commit | 449711cb366962c841e7c6b9c1271484d2965c54 (patch) | |
tree | 431bb6aa43feca0657676cb7f1aceb0521050d0f /llvm/lib/Target/Mips/MipsTargetObjectFile.cpp | |
parent | e113b5e9afeda18d249aca75d473350b94fcda5f (diff) | |
download | llvm-449711cb366962c841e7c6b9c1271484d2965c54.zip llvm-449711cb366962c841e7c6b9c1271484d2965c54.tar.gz llvm-449711cb366962c841e7c6b9c1271484d2965c54.tar.bz2 |
Stop producing .data.rel sections.
If a section is rw, it is irrelevant if the dynamic linker will write to
it or not.
It looks like llvm implemented this because gcc was doing it. It looks
like gcc implemented this in the hope that it would put all the
relocated items close together and speed up the dynamic linker.
There are two problem with this:
* It doesn't work. Both bfd and gold will map .data.rel to .data and
concatenate the input sections in the order they are seen.
* If we want a feature like that, it can be implemented directly in the
linker since it knowns where the dynamic relocations are.
llvm-svn: 253436
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsTargetObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp b/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp index 2059266..146f33b 100644 --- a/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp +++ b/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp @@ -76,7 +76,7 @@ bool MipsTargetObjectFile:: IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, SectionKind Kind) const { return (IsGlobalInSmallSectionImpl(GV, TM) && - (Kind.isDataRel() || Kind.isBSS() || Kind.isCommon())); + (Kind.isData() || Kind.isBSS() || Kind.isCommon())); } /// Return true if this global address should be placed into small data/bss @@ -121,7 +121,7 @@ MipsTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV, // Handle Small Section classification here. if (Kind.isBSS() && IsGlobalInSmallSection(GV, TM, Kind)) return SmallBSSSection; - if (Kind.isDataRel() && IsGlobalInSmallSection(GV, TM, Kind)) + if (Kind.isData() && IsGlobalInSmallSection(GV, TM, Kind)) return SmallDataSection; // Otherwise, we work the same as ELF. |