2016-11-18 16:31 GMT+03:00 Georg-Johann Lay <a...@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.