Article View: gnu.gcc.help
Article #51643gld and initialized data segments
From: Andrew H. Fagg
Date: Thu, 29 Apr 1993 06:00
Date: Thu, 29 Apr 1993 06:00
17 lines
1406 bytes
1406 bytes
I am trying to compile some code to be put into ROM. Several of my variables are declared as "const" (and the value is defined at compile time), and are therefore placed in the initialized data segment (as opposed to being defined as bss). However, when I link, the actual data ends up in my ROM segment, but all of the references to these constants point to my RAM segment (where space has also been reserved). It is almost as if something is supposed to copy the data from ROM into RAM at execution time, but I don't even have a symbol with which to reference the data in ROM. I figure it is probably just a matter of flipping the right compiler flag, but have not found anything in the documentation. Anybody play with this? Thanks, Andy Fagg USC Robotics Lab ahfagg@mensa.usc.edu
Technical Details
Message-ID:
<1rnqt9$d7f@r2dtwo.usc.edu>Path:
arc1-ca.pugleaf.net!gmd.de!ira.uka.de!howland.reston.ans.net!usc!af0aShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,5a3ff6798021617e,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-04-28 23:04:02 PST Path: arc1-ca.pugleaf.net!gmd.de!ira.uka.de!howland.reston.ans.net!usc!af0a From: af0a@r2dtwo.usc.edu (Andrew H. Fagg) Newsgroups: gnu.gcc.help Subject: gld and initialized data segments Date: 28 Apr 1993 23:00:09 -0700 Organization: University of Southern California, Los Angeles, CA Lines: 18 Sender: af0a@r2dtwo.usc.edu Distribution: world Message-ID: <1rnqt9$d7f@r2dtwo.usc.edu> NNTP-Posting-Host: r2dtwo.usc.edu