[PATCH]Remove stack symbol definition from crt files for SH
J. Johnston
jjohnstn@redhat.com
Mon Feb 25 14:29:00 GMT 2002
Jonathan Larmour wrote:
>
> "J. Johnston" wrote:
> >
> > anitak wrote:
> > >
> > > Hi,
> > > When the stack region is specified at the top of the memory in linker
> > > script,
> > > the following definition in newlib/libc/sys/sh/crt0.S
> > > _stack: .long 0xdeaddead causes it to be put out of ram and gives error
> > > for COFF.
> > > Thanks for any reply.
> > > Regards,
> > > Anita Kulkarni
> > >
> >
> > Patch accepted, thanks.
>
> Sorry to time travel backwards :-), but I think this patch has an
> unintended effect. The linker scripts in libgloss (at least) assume that
> _stack is defined. Without this the linker scripts are not usable - in fact
> this makes it difficult to provide a stack without defining the stack in
> the application or some other object which can't be the intention, as
> opposed to simply its location being in the linker script.
>
> Anita's problem was that she didn't define a better location for _stack in
> the linker script, that's all; but that was the way it was intended to be
> used.
>
> Jifl
>
IIRC, the default sh linker script does not define it properly. Is eCos using
the libgloss scripts and depending on the 0xdeaddead value?
-- Jeff J.
> ----------------------------------------------------------------------------
> > > ----------
> > > --- ChangeLog Mon Dec 3 12:43:45 2001
> > > +++ ChangeLog.New Mon Dec 3 13:03:18 2001
> > > @@ -1,3 +1,7 @@
> > > +2001-12-03 Anita Kulkarni <anitak@kpit.com>
> > > +
> > > + * libc/sys/sh/crt0.S: Remove stack symbol definition 0xdeaddead.
> > > +
> > > Wed Dec 14 Jeff Johnston <jjohnstn@redhat.com>
> > >
> > > * configure.host: Turn on long double I/O for Cygwin.
> > >
> > > ----------------------------------------------------------------------------
> > > ----------
> > > --- crt0.S Fri Feb 18 01:09:50 2000
> > > +++ crt0.S.New Mon Dec 3 11:56:28 2001
> > > @@ -52,4 +52,3 @@
> > > #else
> > > .section .stack
> > > #endif
> > > -_stack: .long 0xdeaddead
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > Free download and free European support of GNU tool
> > > chain (GNUSH v0101) for Hitachi's SH Series
> > > Read more at http://www.kpit.com/products/support.htm
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> --
> Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
> Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
More information about the Newlib
mailing list