------- Additional Comments From ericw at evcohs dot com  2005-02-28 22:01 
-------
Subject: Re:  static initialization .data redundantly copied
 to ram prior to use.

bjoern dot m dot haase at web dot de wrote:

>------- Additional Comments From bjoern dot m dot haase at web dot de  
>2005-02-28 21:58 -------
>I think the key problem is, that C language permits you to pass pointers to 
>your static const data structures to other functions. Possibly functions that 
>are not located within the same source file. While functions whithin the 
>source file that defines the const data structures could in principle know 
>that these data should be located in program memory and that they should be 
>accessed by using lpm instructions, I do not see how to pass this knowledge to 
>externally defined functions. Only solution in my opinion would be to define 
>different classes of pointers. 
> 
>
>  
>
Which is a *known issue* for the AVR port. At one point Svein Seldal was 
working on a patch to allow pointers to different memory spaces, but 
that was some time ago and I haven't heard from him about the status of 
his work.

Eric



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20243

Reply via email to