[llvm-commits] [llvm] r78572 - /llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Mon Aug 10 10:58:51 PDT 2009
Author: lattner
Date: Mon Aug 10 12:58:51 2009
New Revision: 78572
URL: http://llvm.org/viewvc/llvm-project?rev=78572&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=78572&r1=78571&r2=78572&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Mon Aug 10 12:58:51 2009
@@ -1063,6 +1063,8 @@
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";
More information about the llvm-commits
mailing list