2011/9/8 Georg-Johann Lay <a...@gjlay.de>: > This patch adds support for named progmem sections. > > The problem with the current implementation is that all progmem stuff is put > into .progmem.data and thus no -gc-sections will have effect or constant > merging cannot merge constants/strings in progmem. > > This patch avoids the hard coded .progmem.data section attribute in > avr_insert_attributes. Instead, it uses avr_asm_named_section and > avr_asm_select_section to choose the right section resp. to add the correct > section prefix for progmem data. > > Tested without regressions. > > Initially I intended to add a -fprogmem-sections command line option that > works > similar but independent to -fdata-section. That way data sections could be > used and strings in progmem merged. However, I did not find a straight > forward > way without cluttering avr BE with lots of code from varasm.c. Thus, for now, > there is no -fprogmem-sections, i.e. progmem-sections are in sync with > data-sections. > > Ok to install?
Please, commit. Denis.