This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20243] static initialization .data redundantly copied to ram prior to use.
- From: "ericw at evcohs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Feb 2005 22:01:53 -0000
- Subject: [Bug target/20243] static initialization .data redundantly copied to ram prior to use.
- References: <20050228040434.20243.schlie@comcast.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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