This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: ecos-3.0 in linux target segfault
- From: Daniel Widyanto <daniel dot widyanto at yahoo dot com>
- To: Bart Veer <bartv at ecoscentric dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 4 Feb 2010 01:45:56 -0800 (PST)
- Subject: Re: [ECOS] ecos-3.0 in linux target segfault
Hi Bart,
Thanks a lot for your help.
I didn't take the 1st step that you have suggested (adding -fno-stack-protector into the kernel / app compilation), because it takes amount of effort to change the Makefiles in the directories.
I downloaded the anoncvs version, then use my ecosconfig to generate the kernel. Now the 'hello world' application works.
Thanks again
Regards,
-daniel
--- On Wed, 2/3/10, Bart Veer <bartv@ecoscentric.com> wrote:
> From: Bart Veer <bartv@ecoscentric.com>
> Subject: Re: [ECOS] ecos-3.0 in linux target segfault
> To: "Daniel Widyanto" <daniel.widyanto@yahoo.com>
> Cc: ecos-discuss@ecos.sourceware.org
> Date: Wednesday, February 3, 2010, 11:32 AM
> >>>>> "Daniel" ==
> Daniel Widyanto <daniel.widyanto@yahoo.com>
> writes:
>
> ? ? Daniel> Hi all,
> ? ? Daniel> I have just downloaded ecos-3.0
> using ecos-install.tcl. I
> ? ? Daniel> want to evaluate ecos in my PC,
> before committing effort
> ? ? Daniel> to run it in LPC17xx (ARM
> Cortex-M3 platform).
>
> ? ? <snip>
> ? ? Daniel> (gdb) run
> ? ? Daniel> Starting program:
> /home/nxp/projects/x86_ecos/app/hello/a.out
>
> ? ? Daniel> Program received signal SIGSEGV,
> Segmentation fault.
> ? ? Daniel> synth_hardware_init () at
> /home/nxp/projects/x86_ecos/ecos-3.0/packages/hal/synth/arch/v3_0/src/synth_intr.c:1235
> ? ? Daniel> 1235??? {
> ? ? Daniel> (gdb)
> ? ? Daniel>
> --------------------------------------------
>
> ? ? Daniel> Is there anything that I can do to
> fix this one ?
>
> Unfortunately the synthetic target can be more sensitive
> to
> enviromental effects than real targets. Physical hardware
> like an
> stm3210e_eval board or an m5272c3 board can be expected to
> behave the
> same way now as when the port was originally done, because
> the
> hardware is exactly the same. The synthetic target can stop
> working
> because of underlying changes in the Linux kernel, the
> toolchain
> supplied by your Linux distributor, etc.
>
> In this case, the problem is almost certainly caused by the
> Ubuntu
> folks changing the default setting of one of the compiler
> flags from
> -fno-stack-protector to -fstack-protector. The latter
> requires
> additional run-time support which was not implemented at
> the time of
> the 3.0 release, so as soon as you hit the first bit of
> code
> implemented in C you get a segv when the compiled code
> attempts a
> stack protection check.
>
> There are two solutions. If you want to stick with the 3.0
> release
> then you need to add -fno-stack-protector to the global
> compiler
> flags. Alternatively you can switch to the anoncvs sources
> which
> contain the following fix for the synthetic target (amongst
> others):
>
> 2009-08-11? Bart Veer? <bartv@ecoscentric.com>
>
> ??? * src/tls.c: new module for TLS (thread
> local storage) support as
> ??? expected by gcc.
>
> ??? * cdl/hal_synth_i386.cdl,
> include/var_arch.h,
> ??? include/pkgconf/mlt_synth_i386_rom.ldi,
> src/vectors.s: add TLS
> ??? support.
>
> Bart
>
> --
> Bart Veer? ? ? ? ? ? ?
> ? ? ? ? ? ? ? ?
> ? ???eCos Configuration Architect
> eCosCentric Limited? ? The eCos experts?
> ? ? http://www.ecoscentric.com/
> Barnwell House, Barnwell Drive, Cambridge, UK.? ?
> ? Tel: +44 1223 245571
> Registered in England and Wales: Reg No 4422071.
> Besuchen Sie uns vom 2-4 März auf der Embedded World 2010,
> Stand 11-208
> Visit us at Embedded World 2010, Nürnberg-Germany, 2-4
> Mar, Stand 11-208
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss