This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [mips java patch] add -mxgot for libjava convenience librarieson mips/mipsel-linux


Matthias Klose wrote:
> David Daney writes:

>>I get no GOT overflow.  The build completes without errors.
>>
>>I still think you have a problem with your binutils configuration.  As I
>>said in previous messages, I would rather not use -mxgot unless absolutely
>>necessary.  And I don't think it is necessary in the places you added it.
> 
> 
> I'm able to build 3.4.2 without any patches on this machine. The
> original failure was
> 
> /home/doko/gcc/gcc-snapshot-20041003/build/gcc/xgcc -shared-libgcc -B/home/doko/gcc/gcc-snapshot-20041003/build/gcc/ -nostdinc++ -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/mipsel-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/include -isystem /usr/lib/gcc-snapshot/mipsel-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtbeginS.o .libs/libgcj.la-2.o -Wl,--whole-archive ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a ./libltdl/.libs/libltdlc.a -Wl,--no-whole-archive  -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libstdc++-v3/src/.libs -L/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu
/libjava ../libffi/.libs/libffi_convenience.a ../boehm-gc/.libs/libgcjgc_convenience.a -lpthread ./libltdl/.libs/libltdlc.a -ldl -lz -L/home/doko/gcc/gcc-snapshot-20041003/build/gcc -lgcc_s -lc -lgcc_s    /home/doko/gcc/gcc-snapshot-20041003/build/gcc/crtendS.o /usr/lib/crtn.o  -Wl,-soname -Wl,libgcj.so.6 -o .libs/libgcj.so.6.0.0
> ../libffi/.libs/libffi_convenience.a(debug.o)(.text+0x20): In function `ffi_assert':
> ../../../src/libffi/src/debug.c:42: relocation truncated to fit: R_MIPS_GOT16 stderr@@GLIBC_2.0
> ../libffi/.libs/libffi_convenience.a(debug.o)(.text+0x34):../../../src/libffi/src/debug.c:42: relocation truncated to fit: R_MIPS_CALL16 fprintf@@GLIBC_2.0
> ../libffi/.libs/libffi_convenience.a(debug.o)(.text+0x54):../../../src/libffi/src/debug.c:43: relocation truncated to fit: R_MIPS_CALL16 ffi_stop_here
> ../libffi/.libs/libffi_convenience.a(debug.o)(.text+0x6c):../../../src/libffi/src/debug.c:44: relocation truncated to fit: R_MIPS_CALL16 abort@@GLIBC_2.0
> ../libffi/.libs/libffi_convenience.a(java_raw_api.o)(.text+0x98): In function `ffi_java_raw_size':
> ../../../src/libffi/src/java_raw_api.c:61: relocation truncated to fit: R_MIPS_CALL16 abort@@GLIBC_2.0
> ../libffi/.libs/libffi_convenience.a(java_raw_api.o)(.text+0x310): In function `ffi_java_raw_call':
> ../../../src/libffi/src/java_raw_api.c:294: relocation truncated to fit: R_MIPS_CALL16 ffi_java_raw_to_ptrarray
> ../libffi/.libs/libffi_convenience.a(ffi.o)(.text+0x3b8): In function `ffi_call':
> ../../../src/libffi/src/mips/ffi.c:485: relocation truncated to fit: R_MIPS_CALL16 ffi_call_O32
> ../libffi/.libs/libffi_convenience.a(ffi.o)(.text+0x46c): In function `ffi_prep_closure':
> ../../../src/libffi/src/mips/ffi.c:520: relocation truncated to fit: R_MIPS_GOT16 ffi_closure_O32
> ../libffi/.libs/libffi_convenience.a(ffi.o)(.text+0x4a4):../../../src/libffi/src/mips/ffi.c:537: relocation truncated to fit: R_MIPS_CALL16 cacheflush@@GLIBC_2.0
> ../libffi/.libs/libffi_convenience.a(o32.o)(.text+0x284):../../../src/libffi/src/mips/o32.S:253: relocation truncated to fit: R_MIPS_CALL16 ffi_closure_mips_inner_O32
> ../boehm-gc/.libs/libgcjgc_convenience.a(allchblk.o)(.text+0x68): In function `GC_print_hblkfreelist':
> ../../../src/boehm-gc/allchblk.c:104: additional relocation overflows omitted from the output
> collect2: ld returned 1 exit status
> make[5]: *** [libgcj.la] Error 1
> make[5]: Leaving directory `/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libjava'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/home/doko/gcc/gcc-snapshot-20041003/build/mipsel-linux-gnu/libjava'
> make[3]: *** [all-target-libjava] Error 2
> make[3]: Leaving directory `/home/doko/gcc/gcc-snapshot-20041003/build'
> make[2]: *** [bootstrap] Error 2
> make[2]: Leaving directory `/home/doko/gcc/gcc-snapshot-20041003/build'
> 
> 
> binutils at version 2.15, gcc configured using
> 
> ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada --prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --enable-nls --enable-threads=posix --without-included-gettext --disable-werror --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk mipsel-linux-gnu

There is somthing wrong with your linker.  It should create GOTs as
necessary to avoid this problem.  The small object files in
libffi_convenience.a and libc_nonshared.a definitely should not cause got
overflow.

Instead of making both gcc and glibc slower with -mxgot, I would try to fix
the linker.

David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]