On Wed, Oct 26, 2005 at 08:13:33PM -0400, Andrew M. Cullen wrote:
> I'm trying to put a structure into the ".noinit" space and I'm getting a
> complaint from the linker. Here is my ".h" definition.
> struct my_dsl_s my_dsl __attribute__ ((section(".noinit")));
Have you tried:
In one file:
struct my_dsl_s my_dsl __attribute__ ((section(".noinit")));
In all others:
extern struct my_dsl_s my_dsl __attribute__ ((section(".noinit")));
This works for me with the gnu toolchain in this situation, though
currently on another target, I'll admit. (And I'm not doing
-funit-at-a-time)
>
> Do I need to inform the linker about this section? (noinit). From the
> avr-libc docs it seems that this section is predefined but based on the
> compiler output it seems it doesn't know what to do with this section.
Nope. If ld didn't know about .noinit, you'd see an error like:
error: no memory region specified for loadable section `.noinit'
(Try using __attribute__ ((section (".chook"))) , for example. ;)
hth,
Erik
--
_,-_|\ Erik Christiansen Phone: +61 3 9264 3416
/ \ Technology Group Fax: +61 3 9264 3438
\_,-.__/ Key Systems Development
v NEC Business Solutions Ltd.
www.necbs.com.au_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list