diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2016-12-02 09:05:56 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2016-12-02 09:05:56 +0000 |
commit | 46f87aa3e06d9db97f21e25af4be91efc3176000 (patch) | |
tree | 83dabbbaea31d05a57cdba2ac8a3481dd2cd6613 | |
parent | 60ebe8ce1d029cbff8ef80c967f98ba43d746f3b (diff) | |
download | gcc-46f87aa3e06d9db97f21e25af4be91efc3176000.zip gcc-46f87aa3e06d9db97f21e25af4be91efc3176000.tar.gz gcc-46f87aa3e06d9db97f21e25af4be91efc3176000.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 26 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 3 |
3 files changed, 35 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 260a66d..d50f546 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-12-02 Georg-Johann Lay <avr@gjlay.de> + + * 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 <jakub@redhat.com> PR rtl-optimization/78547 diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index d873403..c40e289 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 8a0cad7..fd549ec 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 |