This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [ld script] Can I limit the stack size?
- To: jw c <info2choijo at yahoo dot com>
- Subject: Re: [ld script] Can I limit the stack size?
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Mon, 29 Jan 2001 15:19:56 +0000
- Cc: binutils at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <20010129123553.23856.qmail@web1802.mail.yahoo.com>
jw c wrote:
>
> Hello, all.
> I have a question about linker script.
> My linker script has the following line
>
> .stack 0xf000 : { _stack = .; *(.stack) *(._stack) }
>
> so I can set the stack start address.
> I wonder if I also could set the maximum size of
> stack.
Put something else at the address you want the end of the stack to be at,
e.g. .foo 0x10000 : { __foo = . }
I haven't tried this admittedly.
Or if you want to limit it because you don't want it to hit the top of real
memory, use the MEMORY command to describe the memory of your system
exactly. e.g.
MEMORY
{
rom : ORIGIN = 0x40000000, LENGTH = 0x80000
ram : ORIGIN = 0x48000000, LENGTH = 0x200000
}
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine