This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
problems in relocating variables
- To: gcc at gcc dot gnu dot org
- Subject: problems in relocating variables
- From: "P.S.Ravi Kiran" <psrk at cdotb dot ernet dot in>
- Date: Mon, 01 Oct 2001 14:28:24 +0400
sir,
I am using a gcc cross compiler for 68302.
I am having problems locating some variables at addresses I want.
we have a file db.c
like this
// db.c
some_struct x[][];
some_Struct y[][];
.....................
......................
//end of db.c
and I want to locate all of these arrays at 0x500000.
and other global variables from 0x200000
so I defined in my LD script
SECTIONS
{
..................
..............
.bss 0x200000 :
{ *(.bss) *(COMMON) _bend = . ;}
db 0x500000 :
{ db.c }
...............
}
but the compiler is locating the variables in db.c in the COMMON section
in 0x200000
and 0x500000 is empty. (as observed in the generated map file )
can anyone please tell me how to do this ?
Thankyou very much
Sincerely
Ravi Kiran
--
/| __
/ | ,-~ /
/ :| // /
( ) /( .^
>-"~"--"
/ \
/o o |
( ~T~ |
>._-' _./
/ "~" |
Y _, Y
/| ;-"~ _ l
/ l/ ,-"~ \
\//\/ .- \
\ / )
\ I \
]\ _\ /"\
(" ~----( ~ (. )
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| P.S.Ravi Kiran |
| C-DOT, 71/1 Miller Road, |
| BANGALORE -52. |
| Ph. 091-080-2263399,ext-292 |
\ email: psrk@cdotb.ernet.in /
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~