This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: the POSIX test build
- To: "Boris V. Guzhov" <borg at int dot spb dot ru>
- Subject: Re: [ECOS] the POSIX test build
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Mon, 04 Sep 2000 15:46:06 +0100
- CC: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat UK Ltd.
- References: <00ab01c01673$d1a55f60$7601a8c0@borg>
"Boris V. Guzhov" wrote:
> I tried my posix test for the linux syntetic platform.
> (gdb) run
> Starting program: /home/ecostest/work/posix_tests/./pthread1
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x26e in matchlen (s1=0x5b04 "/",
> s2=0x4003cc68 <Address 0x4003cc68 out of bounds>)
> at /usr/local/src/ecos/packages/io/fileio/current/src/misc.cxx:192
> 192 while( s1[len] == s2[len] && s1[len] && s2[len] ) len++;
> Current language: auto; currently c++
> (gdb)
> ----
>
> That is the error occurs before the main() call.
When I try it, I don't even get as far as that. But I know what the problem
is, almost certainly in both cases. sizeof(cyg_mtab_entry) is 28, but the
compiler aligns each one internally to 32 bytes. This causes the table
walking to go wrong and the values to be corrupted. As a temporary measure,
add an extra int field to cyg_mtab_entry in
io/fileio/current/include/fileio.h. I'll try and find a more permanent
solution though.
> And there is one more question:
> are supported the standart "C" stdio functions (like printf()) in
> the posix configuration? When I include the printf() call in my test,
> I have the ld error: "undefined reference to 'printf' "
The posix template is a bare posix kernel only. Try the "elix" template.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault