1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

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.

llvm-svn: 78572
This commit is contained in:
Chris Lattner 2009-08-10 17:58:51 +00:00
parent 7ee4b3a2c0
commit 49b8a24b7e

View File

@ -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";