avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Data in .noinit isn't seen by linker


From: Erik Christiansen
Subject: Re: [avr-gcc-list] Data in .noinit isn't seen by linker
Date: Thu, 27 Oct 2005 11:26:47 +1000
User-agent: Mutt/1.5.6+20040722i

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]