aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-10 17:58:51 +0000
committerChris Lattner <sabre@nondot.org>2009-08-10 17:58:51 +0000
commite1e8a82986e12f9cf841004c78ff051df9df11d8 (patch)
treebe9775cc260cb479e7a566cb5037fdb6f0face0d
parent12b2bda61a78d24e5e7e420d6fd0900d0921036b (diff)
Fix a weird ppc64-specific link error during an llvm-gcc build:
ld: bad offset (0x00000091) for lo14 instruction pic-base fix-up in ___popcountdi2 from libgcc/./_popcountsi2_s.o The problem is that the non lazy symbol pointers need to be 8 byte aligned on ppc64 and .section doesn't have an implicit alignment like ".non_lazy_symbol_pointer" does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78572 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
index 73c9c03854..e13cb66b7a 100644
--- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
@@ -1063,6 +1063,8 @@ bool PPCDarwinAsmPrinter::doFinalization(Module &M) {
if (!GVStubs.empty()) {
// Switch with ".non_lazy_symbol_pointer" directive.
SwitchToSection(TLOFMacho.getNonLazySymbolPointerSection());
+ EmitAlignment(isPPC64 ? 3 : 2);
+
for (StringMap<std::string>::iterator I = GVStubs.begin(),
E = GVStubs.end(); I != E; ++I) {
O << I->second << ":\n";