[LLVMbugs] [Bug 22711] [powerpc64] Section .toc is not properly aligned

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 3 18:28:52 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22711

Markus F.X.J. Oberhumer <markus at oberhumer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #14 from Markus F.X.J. Oberhumer <markus at oberhumer.com> ---
Please have a look at the following proposed patch which

- actually aligns the *label*
- actually deals with ".got2" sections
- also works for the PPCTargetAsmStreamer class

~Markus


--- a/llvm-3.6.0/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm-3.6.0/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -1051,6 +1051,7 @@
         ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC,
         SectionKind::getReadOnly());
     OutStreamer.SwitchSection(Section);
+    OutStreamer.EmitValueToAlignment(isPPC64 ? 8 : 4);

     for (MapVector<MCSymbol*, MCSymbol*>::iterator I = TOC.begin(),
          E = TOC.end(); I != E; ++I) {

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150304/ba5053e0/attachment.html>


More information about the llvm-bugs mailing list