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

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

Re: [avr-gcc-list] Link script question


From: Dave N6NZ
Subject: Re: [avr-gcc-list] Link script question
Date: Fri, 10 Oct 2008 10:02:21 -0700
User-agent: Thunderbird 1.5 (X11/20051201)

Gre7g Luterman wrote:
From: Dave N6NZ <address@hidden> To: Gre7g Luterman
<address@hidden> Cc: address@hidden Sent: Thursday,
October 9, 2008 8:56:07 PM Subject: Re: [avr-gcc-list] Link script
question

I would take very slightly different approach.  Make that a section
of it's own, and put it in the linker script just after your
exported symbol:

__user_prog_start = .;
>> *.(.userprog.*) ;

That would work, of course, but I'd have to designate a constant
address for the block, right?

No, not at all. That's the point of putting it in the linker script and letting the linker compute the address.

The script as I have it now,
automagically selects the first available block after my code. I
really like having this done automatically for me.

And that is exactly what this does. Take a look at the linker script and how it works. All my addition does is declare a named section that starts at exactly the place that your __user_prog_start symbol is defined. It's really your solution, but with an additional name that you can use as an attribute to a data section.

-dave


Does anyone out there have a different solution I can try?

Gre7g





------------------------------------------------------------------------


_______________________________________________ AVR-GCC-list mailing
list address@hidden http://lists.nongnu.org/mailman/listinfo/avr-gcc-list





reply via email to

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