This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: [PATCH]Remove stack symbol definition from crt files for SH
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: "J. Johnston" <jjohnstn at redhat dot com>
- Cc: "J. Johnston" <jjohnstn at cygnus dot com>, anitak <anitak at kpit dot com>,newlib at sources dot redhat dot com
- Date: Tue, 26 Feb 2002 01:27:08 +0000
- Subject: Re: [PATCH]Remove stack symbol definition from crt files for SH
- References: <012f01c17ca4$17df8590$8d100aac@stpp.soft.net> <3C190B42.D754E00F@cygnus.com> <3C7A6725.D4B8D077@redhat.com> <3C7ABAAD.C86B4FB0@redhat.com>
"J. Johnston" wrote:
>
> 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.
>
> IIRC, the default sh linker script does not define it properly. Is eCos using
> the libgloss scripts and depending on the 0xdeaddead value?
Not eCos - this is just something I had noticed for a wholely unrelated
reason. But after some offline chatting with Alexandre Oliva, I think I
understand the reason for it now. Sorry for the false alarm!
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine