Georg-Johann Lay schrieb:

When I wrote this patch I looked at the default linker script to see what goes into .data resp .bss; the hard-coded section maned reflect
.                                                        names
that. For the linkonce stuff I found no explanation (grepping the web yields bunch of questions from people having trouble with it) and in the gcc wiki you find nothing (except you have already a link to what you seek).

The .gnu.linkonce is an overestimation, .gnu.linkonce.d. is perhaps better, but exceptions are not supported on avr, anyway. So an overestimation won't hurt.

Then I wonder where .noinit, .progmem.data, .progmem.gcc_sw_table
would go?

I mean what flags they get.

.init* gets SECTION_BSS in avr_section_type_flags, but there is also a hard-coded section name.

Moreover, there is a discrepancy between C and C++, see PR34734.
In C++, avr_section_type_flags sees no DECL_INITIAL (decl) even if one is present. I read tree stuff and they make no difference between C/C++ and promise DECL_INITIAL is there. Perhaps it's because of different parsers?

avr_section_type_flags could attach (target specific) flags.
However, checking section names explicitely appeared more robust to me, especially because PR34734 indicates that not all information is readily available.

Moreover, this patch is integrated in some avr-gcc distributions and has experienced some real world testing. I didn't hear complaints, but it's likely that I missed them because I am just volonteering and have long times of inactivity because of technical reasons then and when. Eric has definetely a better oversight.

Johann

Reply via email to