From: Georg-Johann Lay Date: Fri, 2 Dec 2016 09:05:56 +0000 (+0000) Subject: invoke.texi (AVR Options): Point to absdata. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46f87aa3e06d9db97f21e25af4be91efc3176000;p=gcc.git invoke.texi (AVR Options): Point to absdata. * doc/invoke.texi (AVR Options) [-mabsdata]: Point to absdata. * doc/extend.texi (AVR Variable Attributes) [progmem]: Hint about linker description to avoid progmem altogether. [absdata]: Point to -mabsdata option. From-SVN: r243170 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 260a66d9e8b..d50f546f9fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-12-02 Georg-Johann Lay + + * doc/invoke.texi (AVR Options) [-mabsdata]: Point to absdata. + * doc/extend.texi (AVR Variable Attributes) [progmem]: Hint + about linker description to avoid progmem altogether. + [absdata]: Point to -mabsdata option. + 2016-12-02 Jakub Jelinek PR rtl-optimization/78547 diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index d873403f453..c40e289c966 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -5929,6 +5929,30 @@ int read_var (int i) @} @end smallexample +Please notice that on these devices, there is no need for @code{progmem} +at all. Just use an appropriate linker description file like outlined below. + +@smallexample + .text : + @{ ... + @} > text + /* Leave .rodata in flash and add an offset of 0x4000 to all + addresses so that respective objects can be accessed by LD + instructions and open coded C/C++. This means there is no + need for progmem in the source and no overhead by read-only + data in RAM. */ + .rodata ADDR(.text) + SIZEOF (.text) + 0x4000 : + @{ + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.r*) + @} AT> text + /* No more need to put .rodata into .data: + Removed all .rodata entries from .data. */ + .data : + @{ ... +@end smallexample + @end table @item io @@ -6001,6 +6025,8 @@ warning like @end itemize +See also the @option{-mabsdata} @ref{AVR Options,command-line option}. + @end table @node Blackfin Variable Attributes diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8a0cad7b078..fd549ec11c7 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -15402,7 +15402,8 @@ GCC supports the following AVR devices and ISAs: Assume that all data in static storage can be accessed by LDS / STS instructions. This option has only an effect on reduced Tiny devices like -ATtiny40. +ATtiny40. See also the @code{absdata} +@ref{AVR Variable Attributes,variable attribute}. @item -maccumulate-args @opindex maccumulate-args