Re: Constant at a defined address

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

 



Phildale <Pdale@xxxxxxxxxxx> 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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux