aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2015-10-14 23:29:10 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2015-10-14 23:29:10 +0000
commitd58d347e42a529d79ede463e2f0c26dfa6f2cb50 (patch)
treed3eebb7861977e0750a0f1d3c036a68655e330ce /llvm/lib/MC/MCObjectFileInfo.cpp
parentb74d3b3b86c606ca72315efd252300fde0db3691 (diff)
downloadllvm-d58d347e42a529d79ede463e2f0c26dfa6f2cb50.zip
llvm-d58d347e42a529d79ede463e2f0c26dfa6f2cb50.tar.gz
llvm-d58d347e42a529d79ede463e2f0c26dfa6f2cb50.tar.bz2
Revert r250342.
Investigate why coal-sections-powerpc.s is failing on some buildbots. llvm-svn: 250346
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp41
1 files changed, 13 insertions, 28 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 666a1c3..31091ef 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -114,37 +114,22 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(Triple T) {
= Ctx->getMachOSection("__TEXT", "__const", 0,
SectionKind::getReadOnly());
- // If the target is not powerpc, map the coal sections to the non-coal
- // sections.
- //
- // "__TEXT/__textcoal_nt" => section "__TEXT/__text"
- // "__TEXT/__const_coal" => section "__TEXT/__const"
- // "__DATA/__datacoal_nt" => section "__DATA/__data"
- Triple::ArchType ArchTy = T.getArch();
-
- if (ArchTy == Triple::ppc || ArchTy == Triple::ppc64) {
- TextCoalSection
- = Ctx->getMachOSection("__TEXT", "__textcoal_nt",
- MachO::S_COALESCED |
- MachO::S_ATTR_PURE_INSTRUCTIONS,
- SectionKind::getText());
- ConstTextCoalSection
- = Ctx->getMachOSection("__TEXT", "__const_coal",
- MachO::S_COALESCED,
- SectionKind::getReadOnly());
- DataCoalSection
- = Ctx->getMachOSection("__DATA","__datacoal_nt",
- MachO::S_COALESCED,
- SectionKind::getDataRel());
- } else {
- TextCoalSection = TextSection;
- ConstTextCoalSection = ReadOnlySection;
- DataCoalSection = DataSection;
- }
-
+ TextCoalSection
+ = Ctx->getMachOSection("__TEXT", "__textcoal_nt",
+ MachO::S_COALESCED |
+ MachO::S_ATTR_PURE_INSTRUCTIONS,
+ SectionKind::getText());
+ ConstTextCoalSection
+ = Ctx->getMachOSection("__TEXT", "__const_coal",
+ MachO::S_COALESCED,
+ SectionKind::getReadOnly());
ConstDataSection // .const_data
= Ctx->getMachOSection("__DATA", "__const", 0,
SectionKind::getReadOnlyWithRel());
+ DataCoalSection
+ = Ctx->getMachOSection("__DATA","__datacoal_nt",
+ MachO::S_COALESCED,
+ SectionKind::getDataRel());
DataCommonSection
= Ctx->getMachOSection("__DATA","__common",
MachO::S_ZEROFILL,