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]

collect2: ld terminated with signal 11 [Segmentation fault]


Hi

We have built the eCos kernel and are trying to integrate our application
programs with it, using a Makefile.

First we tried to build the simple 'Hello, eCos World!' program (hello.c)
with this Makefile and succeeded after tweaking a few compiler and linker
flags.

After this, when we included all our actual application files in the
Makefile, we found that it compiles all the files correctly and generates
the object files, but gives the following error while linking:

------------------------------------------------------------------

/opt/ecos/gnutools/powerpc-eabi/bin/powerpc-eabi-gcc -Ur -Wl -L/working/18_1
0/netbootp_install/lib -Ttarget.ld -nostdlib
 -mcpu=603e -g -nostdlib -Wl,--gc-sections -Wl,-static
/devel/5X-Pilot/obj/ECOS/E1LineCard/E1LineCard.o /devel/5X-Pilot/
lib/ECOS/E1LineCard.a /devel/5X-Pilot/lib/ECOS/5X-Pilot.a  -o
/devel/5X-Pilot/bin/ECOS/E1LineCard.out
collect2: ld terminated with signal 11 [Segmentation fault]
make[1]: *** [/devel/5X-Pilot/bin/ECOS/E1LineCard.out] Error 1
make[1]: Target `all' not remade because of errors.
make[1]: Leaving directory `/devel/5X-Pilot/src/E1LineCard'
make: *** [/devel/5X-Pilot/src/E1LineCard/.build] Error 2
make: Target `default' not remade because of errors.

------------------------------------------------------------------

I don't know if it's a problem with some compiler/linker flag that we're
supposed to include or exclude, or if it's a problem with some application
file. Because we're in the process of porting from VxWorks to eCos and
haven't yet gone through ALL the application files, since there are a lot of
them.

I read on the net that 'Signal 11' faults typically occur due to pointers
referencing memory not assigned to them or due to bad hardware (not likely
here). I'm not sure about the pointers thing, since I yet have to go through
the application files and check for bugs.

The problem, as an initial step, we're including a subset of the total
application files and trying to build this minimal configuration
successfully. So it may be the case that some code in the files we've
included contain pointers to variables/functions in some code we haven't
included yet, or that there may be some variables or function calls we're
using that have been defined in some files that aren't being used.

Please give some guidance here! I am including our Makefiles and a part of
our build process output for your information.

------------------------------------------------------------------

/opt/ecos/gnutools/powerpc-eabi/bin/powerpc-eabi-g++ -c  -DECOS -D_GNU_TOOL 
-D__ECOS -D__ECOS_PPC    -msoft-float -fchec
k-new -mcpu=603e -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -O2 -ffunction-secti
ons -fdata-sections -fno-rtti -fvtable-gc -finit-priority   -fexceptions   -
D_REENTRANT  -DKERNEL -DGLBTRACELEVEL=9 -DTR
ACE_RUNTIME_LEVEL=9 -DTRACE_CONSOLE_LEVEL=3   -I/working/18_10/netbootp_inst
all/include -I/devel/5X-Pilot   -I/devel/5X-
Pilot/src -I/devel/5X-Pilot/ext/poly/inc -I/devel/5X-Pilot/ext/cygwin/inc -o
/devel/5X-Pilot/obj/ECOS/NodeManagement/Nod
eCtrl.o NodeCtrl.cpp
..
/opt/ecos/gnutools/powerpc-eabi/bin/powerpc-eabi-g++ -c  -DECOS -D_GNU_TOOL 
-D__ECOS -D__ECOS_PPC    -msoft-float -fchec
k-new -mcpu=603e -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -O2 -ffunction-secti
ons -fdata-sections -fno-rtti -fvtable-gc -finit-priority   -fexceptions   -
D_REENTRANT  -DKERNEL -DGLBTRACELEVEL=9 -DTR
ACE_RUNTIME_LEVEL=9 -DTRACE_CONSOLE_LEVEL=3   -I/working/18_10/netbootp_inst
all/include -I/devel/5X-Pilot   -I/devel/5X-
Pilot/src -I/devel/5X-Pilot/ext/poly/inc -I/devel/5X-Pilot/ext/cygwin/inc -o
/devel/5X-Pilot/obj/ECOS/NodeManagement/Nod
eCtrlMsgParser.o NodeCtrlMsgParser.cpp
..
..
..
/opt/ecos/gnutools/powerpc-eabi/bin/powerpc-eabi-g++ -c  -DECOS -D_GNU_TOOL 
-D__ECOS -D__ECOS_PPC    -msoft-float -fchec
k-new -mcpu=603e -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -O2 -ffunction-secti
ons -fdata-sections -fno-rtti -fvtable-gc -finit-priority   -fexceptions   -
D_REENTRANT  -DKERNEL -DGLBTRACELEVEL=9 -DTR
ACE_RUNTIME_LEVEL=9 -DTRACE_CONSOLE_LEVEL=3   -I/working/18_10/netbootp_inst
all/include -I/devel/5X-Pilot   -I/devel/5X-
Pilot/src -I/devel/5X-Pilot/ext/poly/inc -I/devel/5X-Pilot/ext/cygwin/inc -o
/devel/5X-Pilot/obj/ECOS/E1LineCard/E1LineC
ard.o E1LineCard.cpp
..
/opt/ecos/gnutools/powerpc-eabi/bin/powerpc-eabi-ar -r
/devel/5X-Pilot/lib/ECOS/E1LineCard.a /devel/5X-Pilot/obj/ECOS/E1
LineCard/E1LineCard.o
cd /devel/5X-Pilot && make -f makefile lib
make[2]: Entering directory `/devel/5X-Pilot'
//g'devel/5X-Pilot/lib/ECOS &&
/opt/ecos/gnutools/powerpc-eabi/bin/powerpc-eabi-ar -M < /tmp/ar.in | sed -e
's/
make[2]: Leaving directory `/devel/5X-Pilot'
/opt/ecos/gnutools/powerpc-eabi/bin/powerpc-eabi-gcc -Ur -Wl -L/working/18_1
0/netbootp_install/lib -Ttarget.ld -nostdlib
 -mcpu=603e -g -nostdlib -Wl,--gc-sections -Wl,-static
/devel/5X-Pilot/obj/ECOS/E1LineCard/E1LineCard.o /devel/5X-Pilot/
lib/ECOS/E1LineCard.a /devel/5X-Pilot/lib/ECOS/5X-Pilot.a  -o
/devel/5X-Pilot/bin/ECOS/E1LineCard.out
collect2: ld terminated with signal 11 [Segmentation fault]
make[1]: *** [/devel/5X-Pilot/bin/ECOS/E1LineCard.out] Error 1
make[1]: Target `all' not remade because of errors.
make[1]: Leaving directory `/devel/5X-Pilot/src/E1LineCard'
make: *** [/devel/5X-Pilot/src/E1LineCard/.build] Error 2
make: Target `default' not remade because of errors.

------------------------------------------------------------------

Regards

Chandrashekhar Padiyar

Attachment: makefile
Description: Binary data

Attachment: Common.make
Description: Binary data

Attachment: Package.make
Description: Binary data

Attachment: Project.make
Description: Binary data

Attachment: tooldefs.ecos
Description: Binary data

-- 
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]