Strange LD error
Posted: Mon Jul 12, 2004 11:00 pm
I'm programming an os. Ans at this point I have a working bootloader and a very simple kernel. I use ld and a linker script to link the kernel. The problem is that when I examine the binary kernel the .text segment is linked right but the internal c data isn't...... So i started inspecting all of the compiling/linking now I found this problem: in the main.o created using gcc -c -o main.o main.c every jump/call has something like <_start+...> THIS is what I want for relocating. But all the adresses pointing to my 'intern data' are absolute adresses without the <foo+...> behind it. So this could not get linked right?
How do I compile with the reloc data? Or is the .o file correct and lies the problem within my linker script?
Just to be clear: by intern data i mean something like this:
printk( "INTERN DATA" );
How do I compile with the reloc data? Or is the .o file correct and lies the problem within my linker script?
Just to be clear: by intern data i mean something like this:
printk( "INTERN DATA" );