This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
wrong initialized global variable (in the wrong section: .bss instead of .data)
- From: Virgil Anuichi <vanuichi at yahoo dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 9 Feb 2005 12:26:53 -0800 (PST)
- Subject: 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