This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [patch,avr] Disallow LDS / STS for .rodata on AVR_TINY.


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.


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