This patch adds two new emulations in order to support rodata in flash for more devices. Purpose of the new emulations is to provide linker descriptions for rodata in flash. Apart from that, the behaviour is the same like for the existing emulation. I added comments to avr.sc which explain the new symbols. If anything is unclear, then I am happy to improve the explanations. What I am unsure about is the ABSOLUTE in avrxmega2_flmap.x: .rodata __rodata_start : AT (__rodata_load_start) { ... __rodata_end = ABSOLUTE(.) ; } > rodata No other places in the ld scripts use ABSOLUTE, e.g. for __data_end in: .data : { ... PROVIDE (__data_end = .) ; } > data AT> text Johan -- PR31124: AVR: Add emulations to support rodata in flash for AVR64* and AVR128* devices. AVR devices from the AVR64* and AVR128* families support that rodata can be located in in program memory. This patch adds new emulations eavrxmega2_flmap and eavrxmega4_flmap. The purpose of the new emulations is to provide new linker description files which facilitate rodata in flash. Apart from a different linker script, the new emulation behave exactly the same like the existing avrxmega2 and avrxmega4. For a detailed explanation of the new symbols and their purposes, cf. the comments in ld/scripttempl/avr.sc. ld/ PR 31124 * configure.tgt (targ_extra_emuls) [targ=avr-*-*]: Add eavrxmega2_flmap, eavrxmega4_flmap. * Makefile.am (ALL_EMULATION_SOURCES): Add eavrxmega2_flmap.c, eavrxmega4_flmap.c. * Makefile.in: Regenerate. * emulparams/avrxmega2.sh (MAYBE_FLMAP): Set to 1. * emulparams/avrxmega4.sh (MAYBE_FLMAP): Set to 1. * emulparams/avrxmega2_flmap.sh: New file. * emulparams/avrxmega4_flmap.sh: New file. * scripttempl/avr.sc: Adjust comments. [MAYBE_FLMAP]: Define symbols: __do_init_flmap, __flmap, __flmap_lsl4, __flmap_init_label. [HAVE_FLMAP]: Add MEMORY region rodata. Add output section .rodata. Define symbols: ___RODATA_VMA__, __RODATA_ORIGIN__, __RODATA_LDS_OFFSET__, __RODATA_REGION_LENGTH__, __RODATA_FLASH_START__, __rodata_start, __rodata_end, __rodata_load_start, __rodata_load_end.