Цитата
Вот, что написано в мануале:
The .noinit Section
This sections is a part of the .bss section. What makes the .noinit section special is that variables which are defined as such:
int foo __attribute__ ((section (".noinit")));
will not be initialized to zero during startup as would normal .bss data.
Only uninitialized variables can be placed in the .noinit section. Thus, the following code will cause avr-gcc to issue an error:
int bar __attribute__ ((section (".noinit"))) = 0xaa;
It is possible to tell the linker explicitly where to place the .noinit section by adding -Wl,--section-start=.noinit=0x802000 to the avr-gcc command line at the linking stage. For example, suppose you wish to place the .noinit section at SRAM address 0x2000:
$ avr-gcc ... -Wl,--section-start=.noinit=0x802000 ...
Note:
Because of the Harvard architecture of the AVR devices, you must manually add 0x800000 to the address you pass to the linker as the start of the section. Otherwise, the linker thinks you want to put the .noinit section into the .text section instead of .data/.bss and will complain.
А как Вы сами это пользуете? Спасибо!
Вот это место не совсем понял:
Note: Because of the Harvard architecture of the AVR devices, you must manually add 0x800000 to the address you pass to the linker as the start of the section. Otherwise, the linker thinks you want to put the .noinit section into the .text section instead of .data/.bss and will complain.
Перевод: Примечание: Из-за Гарвардской архитектуры устройств AVR, вы должны вручную добавить 0x800000 по адресу, который вы передаете редактору связей как запуск секции. Иначе, редактор связей думает, что вы хотите поместить .noinit секцию в .text секцию вместо .data/.bss и будете жаловаться.
Сообщение отредактировал smk - Apr 18 2008, 07:10
Живи днем так, чтобы ночью ты спал спокойно.