This is the mail archive of the
mailing list for the binutils project.
Heap management by linker
- From: "Shrikar" <shrikar at poseidontech dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Thu, 18 Apr 2002 19:10:46 +0530
- Subject: Heap management by linker
I have a querry but I am unable to categorize it. Its either a linker querry
or a startup code writing querry.
I am writing an application which is supposed to be run without the
operating system support. Now the problem is I want to set the base address
and size of the *heap* so that all the calls for malloc(),calloc(),
realloc() etc.. will return the address from this heap instead of standard
or the system heap. Can I do this with the help of linker script as normally
we do for sections like .text and .data. ? If yes how can I do that ?
Is the start address and end address of stack/heap is set by linker ? If yes
then how can I change it according to my requirements?
Is it possible to set the heap and stack addresses in the startup code (I
guess its a usual procedure !!!) ? If yes then where can I get the
information about writing startup code for various targets.
Looking forward for the response,
Thanx in advance,