wrong initialized global variable (in the wrong section: .bss instead of .data)

Virgil Anuichi vanuichi@yahoo.com
Wed Feb 9 23:03:00 GMT 2005


Hello,

I have an issue with the place the global variables
are linked into.
I have an older script:
ENTRY(__start)
SECTIONS
{
    . = 0x81200000;
  .text :
    {
     _ftext = . ;
    *(.init)
     eprol  =  .;
    *(.text)
    *(.fini)
    *(.rodata)
    *(.rodata.*)
     _etext  =  .;
   }

  .data :
   {
   _gp = ALIGN(16) + 0x8000;
   _fdata = . ;
    *(.data)
    CONSTRUCTORS
    *(.sdata)
   }
   _edata  =  .;
   _fbss = .;
  .sbss : {
    *(.sbss)
    *(.scommon)
  }
  .bss : {
    *(.bss)
    *(COMMON)
  }
   _end = .;
}

Now I'm compiling with gnu3.4.1 (I've already updated
the .rodata section to .rodata.*. I have a feeling I'm
still missing some other changes.
Right now all my initialized global variables end up
in the .bss section, which is wrong.
Could somebody help?
And, maybe, send me a link to the right docs? (new
sections, etc.)

Thanks,
Virgil


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250



More information about the Binutils mailing list