http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48086

           Summary: bootstrap-lto creates c-common.s with too many
                    sections on x86_64-apple-darwin10
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: howa...@nitro.med.uc.edu


The number of sections in mach-o has always been restricted to 255. The mach-o
nlist struct has a one byte n_sect field whichis the index of the section that
symbol is in. Previous to Xcode 4.0, the assembler did not validate that the
n_sect field was not overflowed but now does. This causes the lto-bootstrap on
x86_64-apple-darwin10 to fail with...

/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/xgcc
-B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/
-B/sw/lib/gcc4.6/x86_64-apple-darwin10.7.0/bin/
-B/sw/lib/gcc4.6/x86_64-apple-darwin10.7.0/bin/
-B/sw/lib/gcc4.6/x86_64-apple-darwin10.7.0/lib/ -isystem
/sw/lib/gcc4.6/x86_64-apple-darwin10.7.0/include -isystem
/sw/lib/gcc4.6/x86_64-apple-darwin10.7.0/sys-include    -c  -DIN_GCC_FRONTEND
-DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -mdynamic-no-pic -flto=jobserver
-frandom-seed=1 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes  -Wold-style-definition -Wc++-compat
-fno-common  -DHAVE_CONFIG_H -I. -Ic-family -I../../gcc-4.6-20110311/gcc
-I../../gcc-4.6-20110311/gcc/c-family -I../../gcc-4.6-20110311/gcc/../include
-I../../gcc-4.6-20110311/gcc/../libcpp/include -I/sw/include -I/sw/include 
-I../../gcc-4.6-20110311/gcc/../libdecnumber
-I../../gcc-4.6-20110311/gcc/../libdecnumber/dpd -I../libdecnumber
-I/sw/include  -I/sw/include -DCLOOG_INT_GMP -DCLOOG_ORG -I/sw/include
../../gcc-4.6-20110311/gcc/c-family/c-common.c -o c-family/c-common.o
/var/tmp//ccYAptak.s:297257:FATAL:too many sections (maximum 255)

make[3]: *** [c-family/c-common.o] Error 1
make[2]: *** [all-stage2-gcc] Error 2
make[1]: *** [stage2-bubble] Error 2
make: *** [all] Error 2

which, with -v, appears as....

/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/as -arch x86_64
-force_cpusubtype_ALL -o c-family/c-common.o c-common.s
c-common.s:298717:FATAL:too many sections (maximum 255)

Reply via email to