This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Heap management by linker


Hiiii..
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.
Please help.
Looking forward for the response,
Thanx in advance,
Warm regards,

Shrikar.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]