Page 2 of 2

Re:ELF Linker script quick question

Posted: Wed May 31, 2006 7:20 am
by Neo
Did you test it out on Linux/CYGWIN? I will be trying this out on Linux but need to reboot to do that :(

No one else who tried this?

Re:ELF Linker script quick question

Posted: Wed May 31, 2006 8:21 am
by Colonel Kernel
Neo wrote:Did you test it out on Linux/CYGWIN?
I tested it on Cygwin. I have a VM with Mandrake 9.2 on it, but I don't remember if I tested with that or not. It has exactly the same verions of binutils and gcc as my Cygwin installation does.

Re:ELF Linker script quick question

Posted: Wed May 31, 2006 8:56 am
by bkilgore
I remember this happening to me a few months back (the non-constant load base error), and although it's starting to fade a little I'm pretty sure the problem had something to do with missing sections.

In my case, I think my final object file had a .rodata section but I wasn't telling the linker where to put it in the script. Check to see if you have any sections in your object file(s) that are being linked that might not have a home in your linker script.

Re:ELF Linker script quick question

Posted: Wed May 31, 2006 9:00 am
by Neo
Anyone know where I can get version 2.17 of binutils from? Need to check this out further.

Re:ELF Linker script quick question

Posted: Wed May 31, 2006 9:21 am
by bkilgore
Neo wrote: Anyone know where I can get version 2.17 of binutils from? Need to check this out further.
You probably want to get a cvs snapshot since there hasn't been an official stable release. Of course, some people have created releases from the snapshots for various systems, byt cvs is probably your best option

Re:ELF Linker script quick question

Posted: Wed May 31, 2006 9:21 am
by mystran
Actually, try adding *(COMMON) to .bss. Also, for one reason or other, I'm using *(.rodata*) with the extra star in my script.

Re:ELF Linker script quick question

Posted: Wed May 31, 2006 3:04 pm
by Colonel Kernel
mystran wrote: Also, for one reason or other, I'm using *(.rodata*) with the extra star in my script.
I had to add one to HigherHalfBareBones (and my own kernel) when I started compiling with optimizations enabled. The compiler added new sections called .rodata.something (I forget what the something was). I think it contained string constants, but I don't remember exactly...

Re:ELF Linker script quick question

Posted: Thu Jun 01, 2006 12:56 am
by Neo
mystran wrote: Actually, try adding *(COMMON) to .bss. Also, for one reason or other, I'm using *(.rodata*) with the extra star in my script.

The *(.rodata*) and *(COMMON) are both there in my script. :(

Re:ELF Linker script quick question

Posted: Thu Jun 01, 2006 6:53 am
by mystran
Ahm, ok, sorry, must have looked at the other script posted to this thread. :)