diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-19 03:24:42 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-19 03:24:42 +0000 |
commit | 3b3b0ebd2ec9cd1de709007f31f40790c9243511 (patch) | |
tree | 13c74cf44c67d02ac936d7d77a1bf9b733703cd5 /lib | |
parent | dc986d2462ca8df72af9e2f6afac0ba86b753e5b (diff) | |
download | external_llvm-3b3b0ebd2ec9cd1de709007f31f40790c9243511.zip external_llvm-3b3b0ebd2ec9cd1de709007f31f40790c9243511.tar.gz external_llvm-3b3b0ebd2ec9cd1de709007f31f40790c9243511.tar.bz2 |
lib/CodeGen/TargetLoweringObjectFileImpl.cpp: Tweak to emit ".{section}${name}" instead of ".{section}$linkonce_{name}" for linkonce sections.
It seems GNU ld/PECOFF relies on section names, linking with g++'s libstdc++.a would fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 164ee37..890d6e7 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -981,12 +981,12 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, static const char *getCOFFSectionPrefixForUniqueGlobal(SectionKind Kind) { if (Kind.isText()) - return ".text$linkonce"; + return ".text$"; if (Kind.isBSS ()) - return ".bss$linkonce"; + return ".bss$"; if (Kind.isWriteable()) - return ".data$linkonce"; - return ".rdata$linkonce"; + return ".data$"; + return ".rdata$"; } @@ -1001,7 +1001,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, const char *Prefix = getCOFFSectionPrefixForUniqueGlobal(Kind); SmallString<128> Name(Prefix, Prefix+strlen(Prefix)); MCSymbol *Sym = Mang->getSymbol(GV); - Name.append(Sym->getName().begin(), Sym->getName().end()); + Name.append(Sym->getName().begin() + 1, Sym->getName().end()); unsigned Characteristics = getCOFFSectionFlags(Kind); |