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: Calling Ubunutu users: testing please


On Thu, Aug 09, 2007 at 02:39:29AM +0200, Ivan Kostov wrote:
> Hi ,
> 
> I'm using Ubuntu 6.06
> 
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v
> --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
> --enable-shared --with-system-zlib --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --enable-nls
> --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-java-awt=gtk-default
> --enable-gtk-cairo
> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
> --enable-mpfr --disable-werror --with-tune=pentium4
> --enable-checking=release i486-linux-gnu
> Thread model: posix
> gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

Hi Ivan

It seems like the problem happens with newer compilers. 

Ubunutu have enabled the compiler flag stack-protector by default in
at least version 4.1.2 of gcc and i expect all newer versions. For
stack protector to work, the compiler need a bit of help from the
process/thread startup code to allocate some memory and initialize a
processor register to point to it. eCos on synth is currently not
doing this. So when it tries to access this memory, it actually tries
to read/write from 0x0:0x14 which throws a segmentation fault.

> And the only problem was the - -finit-priority option.
> When you turn it of everything works fine (Using not the CVS snapshot
> but the version from the site). I had the problem target.ld on our build
> server (Suse 9.x) -
> 
> MEMORY
> {
>     rom : ORIGIN = 0x00000000, LENGTH = 0x800000

So you have moved ROM down from 0x01000000 to 0x0. This actually
fits. You have put memory where it is trying to access. However, you
now have 0x0:14 corrupted by the stack checking code :-(

I expect with time stack-protector will be turned on for other
distributions. So either we need to set the synth hal compiler flags
to turn it off, or implement what it needs to work.

   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]