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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to