public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* wrong initialized global variable (in the wrong section: .bss instead of .data)
@ 2005-02-09 23:03 Virgil Anuichi
  2005-02-10  4:25 ` Alan Modra
  0 siblings, 1 reply; 8+ messages in thread
From: Virgil Anuichi @ 2005-02-09 23:03 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-02-10 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-09 23:03 wrong initialized global variable (in the wrong section: .bss instead of .data) Virgil Anuichi
2005-02-10  4:25 ` Alan Modra
2005-02-10 17:26   ` Virgil Anuichi
2005-02-10 19:04     ` Dave Korn
2005-02-10 21:20       ` Dave Korn
2005-02-10 23:40       ` Virgil Anuichi
2005-02-11  0:05         ` Virgil Anuichi
2005-02-11  0:19           ` Virgil Anuichi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).