[Bug target/71151] [avr] -fmerge-constants and -fdata-sections/-ffunction-sections results in string constants in .progmem.gcc_sw section

senthil.thecoder at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed May 18 09:15:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71151

--- Comment #3 from Senthil Kumar Selvaraj <senthil.thecoder at gmail dot com> ---
Yeah, it's a 6.x thing. There's a commit that changes varasm.c from using
targetm.asm_out.mergeable_rodata_prefix to a function call to
targetm.asm_out.function_rodata_section hook if the section category is
SECCAT_RODATA_MERGE_STR. So avr_asm_function_rodata_section now gets called for
string literals inside functions, not just jumptables.

I'm trying out a fix that propagates the section category down to the target
hook and have the avr backend use it to distinguish between jumptables and
other data.


More information about the Gcc-bugs mailing list