Page 2 of 2
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 7:39 am
by alphabetagamma
Code: Select all
ld -v
file k_entry.o
file kernel.o
gives the results in the addition.
by the way:
when i use the assembler command "-f elf" instead of "-f aout" and then try to link it with "ld -T kernel.ld kernel.o k_entry.o" i get:
ld: cannot perform PE operations ons non PE output file 'a.exe'.
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 7:47 am
by JamesM
Hi,
The problem is with kernel.o. Post the results of:
Also, try recompiling kernel.o. It's been compiled with the cygwin standard compiler, not the crosscompiler.
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 7:54 am
by alphabetagamma
ok then how can i substitute the cygwin gcc for the cross gcc ?
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 8:01 am
by JamesM
did you do the "export PATH=..." command I gave you?
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 8:07 am
by alphabetagamma
yes but i didnt use "i686-elf-gcc" i think i need that command and not "gcc".
the new cygwin output in addition.
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 8:10 am
by JamesM
Excellent - in k_entry.asm, change the "call _k_main" to "call k_main", and you should be sorted.
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 8:21 am
by alphabetagamma
one more error:
i686-elf-ld -T kernel.ld kernel.o k_entry.o
i686-elf-ld: warning: cannot find entry symbol start; defaulting to ff800000
edit: addition: thats what i changed...had to change the fourth line "[extern _k_main]" to "[extern k_main]" otherwise he says "undefined defined symbol k_main" at the call...
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 8:37 am
by JamesM
... and change "_start" to "start"? Come on, surely you could work that out?
Re: Problem with the gnu linker (ld.exe)
Posted: Tue Dec 02, 2008 8:44 am
by alphabetagamma
i tried all combinations..perhabs the adress ist wrong ?
ff800000 ?