gnu-ld: looping in map_segments

John Breitenbach breiten@lexmark.com
Tue Feb 26 18:12:00 GMT 2008


I guess I answered my own question.  Adding -lgcc_s to the linker's 
command line solves the problem.  I tried building with both 
binutils-2.18 and last week's snapshot.  Both complained about not being 
able to find libstdc++.  When I located this library in the compiler's 
path and added that directory to the linker's command line, I got errors 
regarding Unwind stuff.  Adding -lgcc_s solved that.  Both of the newer 
linker worked with these changes.  And when I went back to the linker I 
had been using, it works now, too.

This problem comes and goes with a trivial code change to one of my C 
modules - so I'm guessing its due to actual code size.  I add or remove 
one extra call to a function (4 instructions) which is already called 
many times, to see this problem come and go.


John Breitenbach wrote:
> Hi,
>  We began getting this message after a few supposedly benign changes 
> to our big app (800+- modules + libraries) the other day.  This is 
> using GNU ld version 2.17 20061206 build for ppc-linux-elf hostest on 
> x86 Linux (RHEL4)
>
> I'll try to get the latest and greatest version this evening to see if 
> the problem goes away.  I'll also work on reverting changes to a few C 
> files to see what caused the error message to begin showing up.
>
> But even if the latest version works, upgrading is painful, and I'd 
> like to know what the problem is in hopes that a linker script change 
> could avoid this problem.
>
> Thanks,
> John Breitenbach
>



More information about the Binutils mailing list