diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-10 17:58:51 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-10 17:58:51 +0000 |
| commit | ec64b737121ad5bc85ecbb71c00ee3c73942be7a (patch) | |
| tree | ad31f859d1785a9d3aab8544e88d316f21e1398e | |
| parent | 7b01bf612549ff49c6800de1f94c7be2dac34796 (diff) | |
| download | bcm5719-llvm-ec64b737121ad5bc85ecbb71c00ee3c73942be7a.tar.gz bcm5719-llvm-ec64b737121ad5bc85ecbb71c00ee3c73942be7a.zip | |
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
| -rw-r--r-- | llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index 73c9c03854b..e13cb66b7ac 100644 --- a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/llvm/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"; |

