This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: linker segmentation fault


I was having this problem too. I found in the GCC mailing lists that there was a bug related to the BFD code in some incarnation of 3.2.1, it was fixed in 3.2.1 cvs (I think). I built my own toolchain from 3.2.3, and the linker still crashed. But it gave me a warning (error) that it was throwing away virtual tables. I ended up needing to add virtual destructors to some pure abstract classes to straighten the whole thing out. Still don't completely understand why.

My platform was x86, but very similar to your problem. I could not link my library + my app + ecos library.

Good luck
David

Andrew Lunn wrote:

On Wed, Sep 08, 2004 at 10:50:14AM -0700, David Chu wrote:


While I was linking my application with ecos lib and
my own libs under cygwin, I got a seqmentation fault
from the linker.

It doesn't seem to be related to the stack size since
the same problem showed up under Linux environment
which has unlimited stack size.

Does anyone have the same problem before?


Thanks,


- David

======================================

arm-elf-gcc -nostartfiles
-L/opt/ecos/os-build/innov_default_install/lib -L. --n
o-target-default-spec -Wl,--gc-sections -Wl,-static -g
-O2 -nostdlib -o ./ovtphone_ecos_arm.exe
OVTEmbeddedApp.o ClientConfig.o OVTPhone.o -Ttarget.ld
../../../mplapi/stacks/lib/stack_ecos_arm.a -nostdlib
collect2: ld terminated with signal 11 [Segmentation
fault]
make: *** [ovtphone_ecos_arm.exe] Error 1




This often happens when you eg ask an arm linker to link in some x86 code. Check all your object files and libraries realy are arm.

Andrew




-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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