This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,avr] Disallow LDS / STS for .rodata on AVR_TINY.
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>, Pitchumani Sivanupandi <pitchumani dot sivanupandi at microchip dot com>
- Date: Mon, 21 Nov 2016 09:58:19 +0300
- Subject: Re: [patch,avr] Disallow LDS / STS for .rodata on AVR_TINY.
- Authentication-results: sourceware.org; auth=none
- References: <540210d1-fe71-bc83-35e4-443ee1084b03@gjlay.de>
2016-11-18 16:31 GMT+03:00 Georg-Johann Lay <avr@gjlay.de>:
> Currently, Binutils still comes with an AVR_TINY linker description file
> which puts .rodata into RAM so that LDS is applicable for reading such
> objects.
>
> However, as these devices come with a linearised address model, linker
> descriptions which put .rodata into flash are much more reasonable. This
> patch caters for such situations: As .rodata virtual addresses will be
> offset by 0x4000, respective objects may no more be accessed by LDS.
>
> Moreover, objects with a section attribute won't be accessed by LDS.
>
> Ok for trunk?
>
> Johann
>
> PR target/78093
> * config/avr/avr.c (avr_decl_maybe_lds_p): New static function.
> (avr_encode_section_info) [TARGET_ABSDATA && AVR_TINY]: Use it.
Approved.
Please apply.