This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how to parse the special define
bb c <chenbenbin@gmail.com> writes:
> Yes, Gcc don't suport it now. Could we use the pragma to set the
> variable attribute and handle the attribute at backend to asm?
I suppose that would be possible, although just using a variable
attribute would be simpler if you don't have existing code.
> "The usual way to put a variable at a specific memory address
> would be to use an attribute to put the variable in a specific section
> and to use a linker script to put that section at a specific address."
>
> Could you tell me how to use the variable attribute to put the
> varibable to a specific section? Thanks.
In
http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Variable-Attributes.html#Variable-Attributes
search for section ("section-name").
Ian