This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problems in relocating variables



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   /    
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]