This is the mail archive of the ecos-discuss@sourceware.org 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: hello world app SEG faults with Linux synth target


After the stdiooutput test worked, I thought I'd try and run the
simple hello world program
too! (just for completeness support).

For this to work, I had to add the extra package libc_stdio (and it's
related dependencies).

However, on running the hello world app, there's no output.

Strangely now, even my earlier stdiooutput program (which was working)
stops working
after printing the following:

$ ./install/tests/language/c/libc/stdio/v3_0/tests/stdiooutput
INFO:<Starting tests from testcase
/home/mandeep/ecos/ecos-3.0/packages/language/c/libc/stdio/v3_0/tests/stdiooutput.c
for C library stdio output functions>
INFO:<The output of these tests needs to be manually verified.>
INFO:<Expect: Hello printf world 42!>

I have to press Ctrl+C to kill the app.

Running "strace" on both programs reveal some seg faults happening internally.

$ starce ./hello
...
...
 VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
sigreturn()                             = ? (mask now [TRAP ABRT USR1
USR2 STKFLT TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
sigreturn()                             = ? (mask now [TRAP ABRT USR1
USR2 STKFLT TTIN TTOU URG XCPU XFSZ


$ starce ./install/tests/language/c/libc/stdio/v3_0/tests/stdiooutput
...
...
 VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
sigreturn()                             = ? (mask now [TRAP ABRT USR1
USR2 STKFLT TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

I had compiled the app too with the extra -fno-stack-protector switch.
Is that fine?

Regards,
-mandeep


On Wed, Jul 22, 2009 at 7:40 PM, Sergei
Gavrikov<sergei.gavrikov@gmail.com> wrote:
> On Wed, Jul 22, 2009 at 07:35:03PM +0530, Mandeep Sandhu wrote:
>> > Let me try again by starting afresh, from scratch for everything, using the
>> > i386-elf toolchain. Let me get back here then.
>>
>> It worked! :)
>
> [snip]
>
>> edit ecos.ecc
>> set CYGBLD_GLOBAL_COMMAND_PREFIX to "i386-elf"
>
> That's right.
>
>> change CYGBLD_GLOBAL_CFLAGS, append -fno-stack-protector
> ?^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> And this step is needed only if you use Debian/Ubuntu host GCC.
>
> Will,
>
> Sergei
>
>

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