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: "bjoern dot m dot haase at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Feb 2005 21:58:16 -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 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.
Yours,
Björn.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20243