diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-02-13 07:52:39 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-02-13 07:52:39 +0000 |
commit | d99f427e31377e93cf40690cb521850a2b755233 (patch) | |
tree | 8d9813019fc24462da325057a31918e06c2f0a99 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 191b57478e2bdb46d2c2155ba3e3fe19f2e5d731 (diff) | |
download | llvm-d99f427e31377e93cf40690cb521850a2b755233.zip llvm-d99f427e31377e93cf40690cb521850a2b755233.tar.gz llvm-d99f427e31377e93cf40690cb521850a2b755233.tar.bz2 |
Revert a series of commits starting at r228886 which is triggering some
regressions for LLDB on Linux. Rafael indicated on lldb-dev that we
should just go ahead and revert these but that he wasn't at a computer.
The patches backed out are as follows:
r228980: Add support for having multiple sections with the name and ...
r228889: Invert the section relocation map.
r228888: Use the existing SymbolTableIndex intsead of doing a lookup.
r228886: Create the Section -> Rel Section map when it is first needed.
These patches look pretty nice to me, so hoping its not too hard to get
them re-instated. =D
llvm-svn: 229080
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 8aa6653..4f46e37 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -228,25 +228,25 @@ const MCSection *TargetLoweringObjectFileELF::getExplicitSectionGlobal( /// DataSections. static StringRef getSectionPrefixForGlobal(SectionKind Kind) { if (Kind.isText()) - return ".text"; + return ".text."; if (Kind.isReadOnly()) - return ".rodata"; + return ".rodata."; if (Kind.isBSS()) - return ".bss"; + return ".bss."; if (Kind.isThreadData()) - return ".tdata"; + return ".tdata."; if (Kind.isThreadBSS()) - return ".tbss"; + return ".tbss."; if (Kind.isDataNoRel()) - return ".data"; + return ".data."; if (Kind.isDataRelLocal()) - return ".data.rel.local"; + return ".data.rel.local."; if (Kind.isDataRel()) - return ".data.rel"; + return ".data.rel."; if (Kind.isReadOnlyWithRelLocal()) - return ".data.rel.ro.local"; + return ".data.rel.ro.local."; assert(Kind.isReadOnlyWithRel() && "Unknown section kind"); - return ".data.rel.ro"; + return ".data.rel.ro."; } const MCSection *TargetLoweringObjectFileELF:: @@ -268,19 +268,16 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, StringRef Prefix = getSectionPrefixForGlobal(Kind); SmallString<128> Name(Prefix); - bool UniqueSectionNames = TM.getUniqueSectionNames(); - if (UniqueSectionNames) { - Name.push_back('.'); - TM.getNameWithPrefix(Name, GV, Mang, true); - } + TM.getNameWithPrefix(Name, GV, Mang, true); + StringRef Group = ""; if (const Comdat *C = getELFComdat(GV)) { Flags |= ELF::SHF_GROUP; Group = C->getName(); } - return getContext().getELFSection(Name, getELFSectionType(Name, Kind), - Flags, 0, Group, !UniqueSectionNames); + return getContext().getELFSection( + Name.str(), getELFSectionType(Name.str(), Kind), Flags, 0, Group); } if (Kind.isText()) return TextSection; |