Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-16 Thread Laurent GUERBY
Hi, When linking a very large (> 100MB executable) application on powerpc-linux with trunk we get linker errors: .../lib/gcc/powerpc-unknown-linux-gnu/4.4.0/crtbegin.o:(.fini+0x0): relocation truncated to fit: R_PPC_REL24 against `.text' .../lib/gcc/powerpc-unknown-linux-gnu/4.4.0/crtend.o:(.init

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-16 Thread Alan Modra
On Mon, Jun 16, 2008 at 01:27:58PM +0200, Laurent GUERBY wrote: > Hi, > > When linking a very large (> 100MB executable) application on > powerpc-linux with trunk we get linker errors: > > .../lib/gcc/powerpc-unknown-linux-gnu/4.4.0/crtbegin.o:(.fini+0x0): > relocation truncated to fit: R_PPC_REL

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-16 Thread Laurent GUERBY
On Mon, 2008-06-16 at 23:36 +0930, Alan Modra wrote: > On Mon, Jun 16, 2008 at 01:27:58PM +0200, Laurent GUERBY wrote: > > Hi, > > > > When linking a very large (> 100MB executable) application on > > powerpc-linux with trunk we get linker errors: > > > > .../lib/gcc/powerpc-unknown-linux-gnu/4.4

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-29 Thread Andreas Jaeger
I had the same problem on my PowerPC Linux machine and the workaround I'm using now is to run make with the additional flag STAGE1_CFLAGS=-O. The problem (thanks to Andreas Schwab and Michael Matz for help) is that .glink and .text is too far away from each other (> 32 MB in the non-optimized case

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-29 Thread David Edelsohn
> Andreas Jaeger writes: Andreas> I had the same problem on my PowerPC Linux machine and the workaround Andreas> I'm using now is to run make with the additional flag STAGE1_CFLAGS=3D-O. Andreas> The problem (thanks to Andreas Schwab and Michael Matz for help) is that Andreas> .glink and .te

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-29 Thread Andreas Schwab
David Edelsohn <[EMAIL PROTECTED]> writes: >> Andreas Jaeger writes: > > Andreas> I had the same problem on my PowerPC Linux machine and the workaround > Andreas> I'm using now is to run make with the additional flag > STAGE1_CFLAGS=3D-O. > Andreas> The problem (thanks to Andreas Schwab and M

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-29 Thread Andreas Jaeger
On Sun, Jun 29, 2008 at 03:08:43PM +0200, Andreas Schwab wrote: > David Edelsohn <[EMAIL PROTECTED]> writes: > > >> Andreas Jaeger writes: > > > > Andreas> I had the same problem on my PowerPC Linux machine and the > > workaround > > Andreas> I'm using now is to run make with the additional f

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread David Edelsohn
> Andreas Jaeger writes: Andreas> I'm not a build machinery expert - if anybody has a patch, I'll happily test it, Andreas> I'm building on Linux/Powerpc64. Andreas> Adding the above line to rs6000/x-linux64 did not help me. Btw. Andreas> we would need it for other files - like gnat1 - as w

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread Andreas Jaeger
David Edelsohn <[EMAIL PROTECTED]> writes: >> Andreas Jaeger writes: > > Andreas> I'm not a build machinery expert - if anybody has a patch, I'll > happily test it, > Andreas> I'm building on Linux/Powerpc64. > > Andreas> Adding the above line to rs6000/x-linux64 did not help me. Btw. > Andr

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread laurent
Selon Andreas Jaeger <[EMAIL PROTECTED]>: > This gets me a bit further but I do get later a build failure in > configure: > > checking for powerpc64-suse-linux-gnu-strip... strip > checking whether ln -s works... yes > checking for powerpc64-suse-linux-gnu-gcc... /abuild/aj/gcc-tst/./gcc/xgcc > -B

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread Andreas Jaeger
[EMAIL PROTECTED] writes: > Selon Andreas Jaeger <[EMAIL PROTECTED]>: > >> This gets me a bit further but I do get later a build failure in >> configure: >> >> checking for powerpc64-suse-linux-gnu-strip... strip >> checking whether ln -s works... yes >> checking for powerpc64-suse-linux-gnu-gcc..

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread David Edelsohn
>> checking for suffix of object files... configure: error: in >> `/abuild/aj/gcc-tst/powerpc64-suse-linux-gnu/libgcc': >> configure: error: cannot compute suffix of object files: cannot compile >> See `config.log' for more details. This is the friendly way the GCC build process reports th

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread Andreas Jaeger
David Edelsohn <[EMAIL PROTECTED]> writes: >>> checking for suffix of object files... configure: error: in >>> `/abuild/aj/gcc-tst/powerpc64-suse-linux-gnu/libgcc': >>> configure: error: cannot compute suffix of object files: cannot compile >>> See `config.log' for more details. > > This is

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread David Edelsohn
> Andreas Jaeger writes: Andreas> So, it means that --relax is not the right solution for the problem. Andreas> I'll continue with the STAGE1_CFLAG flag but if anybody else wants me to Andreas> test something, please tell me, Maybe Alan will have some insight about --relax not worki

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-06-30 Thread Alan Modra
On Mon, Jun 30, 2008 at 11:04:43AM -0400, David Edelsohn wrote: > > Andreas Jaeger writes: > > Andreas> So, it means that --relax is not the right solution for the problem. > > Andreas> I'll continue with the STAGE1_CFLAG flag but if anybody else wants > me to > Andreas> test something, plea

Re: Linking very large application with GCC trunk on powerpc-linux leads to relocation error of crtbegin/end.o

2008-08-06 Thread Alan Modra
Found it, finally. powerpc ld --relax had a bug affecting -fPIC code. See http://sourceware.org/ml/binutils/2008-08/msg00040.html -- Alan Modra Australia Development Lab, IBM