This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


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