avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Proof-read


From: daniel_laptop
Subject: Re: [avr-libc-dev] Proof-read
Date: Wed, 27 Nov 2002 16:42:01 +1300

Joerg Wunsch wrote:

> As daniel_laptop wrote:
>
> > In the .noinit description at
> >  
> > http://savannah.nongnu.org/download/avr-libc/doc/avr-libc-user-manual/mem_sections.html#mem_sections
> >
> > quote
> > "
> > It is possible to tell the linker explicitly where to place the .noinit
> > section by adding
> > -Wl,--section-start=.noinit=0x802000 to the avr-gcc command line at the
> > linking stage.
> > "
> >
> > It would be good idea to add a NOTE that doing this will also move
> > __heap_start (heap)
> > to '.noinit start + size of noinit.'
>
> Daniel, thanks for the reminder.
>
> Could you please write up a paragraph explaining this, and provide a
> patch for this?
>

I am not familiar with dox and need to clear some hard drive space to do
a complete build of gcc,avr-libc so this patch is UNTESTED

NOTE with standard linker scripts the .noinit section is always in-between 
__bss_end and
__heap_start (just normally zero size) which is not shown in this link
 
http://savannah.nongnu.org/download/avr-libc/doc/avr-libc-user-manual/malloc.html#malloc_extram
I am sorry but my dox skills won't be able to modify this link :-(

Thanks
Daniel


Index: doc/api/sections.dox
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/doc/api/sections.dox,v
retrieving revision 1.5
diff -u -r1.5 sections.dox
--- doc/api/sections.dox        16 Nov 2002 21:05:17 -0000      1.5
+++ doc/api/sections.dox        27 Nov 2002 03:49:12 -0000
@@ -111,6 +111,12 @@
 the section.  Otherwise, the linker thinks you want to put the .noinit section
 into the .text section instead of .data/.bss and will complain.
 
+/note With the standard linker scripts __heap_start is set to the end
+of the .noinit section so moving the .noinit section will also
+move __heap_start but NOT __heap_end so when using \c malloc()
+in the application (which could even happen inside library calls),
+\ref malloc_extram "additional adjustments" are required.
+
 Alternatively, you can write your own linker script to automate this. [FIXME:
 need an example or ref to dox for writing linker scripts.]
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]