This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Constant at a defined address
- From: Ian Lance Taylor <iant at google dot com>
- To: Phildale <Pdale at activer dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 08 Jun 2006 10:52:58 -0700
- Subject: Re: Constant at a defined address
- References: <4774141.post@talk.nabble.com>
Phildale <Pdale@activer.com> writes:
> In other compilers this works
>
> #define Address
>
> const u8 Var[] @ Address = {
> 1,2,3
> }
>
> so Var is alway at address, how can i do this with teh GCC compiler?
You can't.
You can do something along these lines using the linker. Read about
linker scripts in the linker manual.
Ian