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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 26 08:12:40 PST 2015


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

            Bug ID: 22711
           Summary: [powerpc64] Section .toc is not properly aligned
           Product: libraries
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: markus at oberhumer.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

powerpc64 elf: section ".toc" is not properly aligned.

Interestingly it works (by accident?) when using "-save-temps".

$ cat test.c

void test(int *a) {
    switch (*a++) {
    case 17: *a =  2; break;
    case 13: *a =  3; break;
    case 11: *a =  5; break;
    case  7: *a =  7; break;
    case  5: *a = 11; break;
    case  3: *a = 13; break;
    case  2: *a = 17; break;
    }
}

// EOF

$ clang-3.6.0rc4 -target powerpc64-linux-gnu -Wall -W -c test.c
$ readelf --wide -S test.o | grep ' \.toc '

  [ 9] .toc              PROGBITS        0000000000000000 000198 000008 00  WA 
0   0  1

##### now using "-save-temps":

$ clang-3.6.0rc4 -target powerpc64-linux-gnu -Wall -W -save-temps -c test.c
$ readelf --wide -S test.o | grep ' \.toc '

  [ 9] .toc              PROGBITS        0000000000000000 000198 000008 00  WA 
0   0  8

-- 
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/20150226/67d1ca54/attachment.html>


More information about the llvm-bugs mailing list