This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Segmentation Fault using cross architecture ld command


Hi all.

We are upgrading (understatement of the century) our cross-compiler from
GCC 2.95.2, binutils 2.10.1 to GCC 4.2.0, binutils 2.17.  Cross
compiling from Linux i686 to PowerPC.  What we create is a statically
built firmware from 1000+ modules. This "firmware" gets downloaded into
flash on the devices we build.

The problem we are getting is a "segmentation fault" on the
powerpc-eabi-ld.

Both the compiler and binutil tools built fine as far as I can tell.  

We first use the powerpc-eabi-ld command to create logical groupings of
the compiled modules; emulations, network, drivers, etc.  This creates
what we call .rel files. These seem to work ok.  A sample call would be:

.../path/powerpc-eabi-ld -r -nostdlib -o abc.rel a.o b.o c.o 

The invocation of ld that gets the fault does the final linkage of the
printer firmware.  It links together the .rel files with a few
miscellaneous other object files.  

.../path/powerpc-eabi-ld abc.rel def.rel ghi.rel x.o x123.o -Map
frmware.map -o frmware.abs -L. -L<lots of these>  -Tlnkscrpt.ld 

To try and identify the offending object I've manipulated the "call"
with different combinations and number of the .rel files.  The fault
seems to occur after the inclusion of no specific .rel file, but rather
after "so many" .rel files.  

I do not know how to track down this problem.  I'm not even sure I built
the tool chain appropriately.  There is no one left here who had a hand
in the last time the tool chain was upgraded.

I had to add to the linker script a section for .rela.dyn which I copied
from the built-in linker script

Any help would be greatly appreciated.  Please let me know what
additional information is required.



Thanks

John Morrison
Printronix Inc.
Irvine, CA


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