Re:Strange compilation problem
Posted: Wed Jan 19, 2005 1:34 am
a while back i experienced a similar problem after upgrading versions of gcc where the gnu folk had decided to create some new sections and relocate some code to them.
after some small alterations to my linker script it now works again..here is my linker script (c++ kernel)
for me the relavant sections where the gnu.linkonce.* ones..you may want to look into them.
proxy
after some small alterations to my linker script it now works again..here is my linker script (c++ kernel)
Code: Select all
OUTPUT_FORMAT("elf32-i386")
ENTRY(start)
virt = 0xc0100000; /* 3.1 gig */
phys = 0x00100000; /* 1 meg */
SECTIONS
{
.text virt : AT(phys)
{
code = .; _code = .; __code = .;
*(.text)
*(.gnu.linkonce.t*)
. = ALIGN(4096);
}
.rodata : AT(phys + (rodata - code))
{
rodata = .; _rodata = .; __rodata = .;
*(.rodata*)
*(.gnu.linkonce.r*)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .; _data = .; __data = .;
*(.data)
__CTOR_LIST__ = .;
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
*(.ctors)
LONG(0)
__CTOR_END__ = .;
__DTOR_LIST__ = .;
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
*(.dtors)
LONG(0)
__DTOR_END__ = .;
*(.gnu.linkonce.d*)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .; _bss = .; __bss = .;
*(.bss)
*(COMMON)
*(.gnu.linkonce.b*)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
}
proxy