Linking Problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Kieran
Member
Member
Posts: 54
Joined: Mon Apr 11, 2005 11:00 pm

Post by Kieran »

i have added an entry point and the problem still ocurs
User avatar
Wave
Member
Member
Posts: 50
Joined: Sun Jan 20, 2008 5:51 am

Post by Wave »

Kieran wrote:i have added an entry point and the problem still ocurs
Binary files don't have a format so grub can find the entry point, so it always starts at the start of your file (maybe there's an option for entry point in the a.out cludge?). You should be sure your real entry point is at the start of your file together with the multiboot header.
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler.
Melvin Conway
nick8325
Member
Member
Posts: 200
Joined: Wed Oct 18, 2006 5:49 am

Post by nick8325 »

Yes, the multiboot header specifies the entry point (as well as BSS size, etc.).

Edit: to the OP, did you see my suggestion
Are you using GRUB? If so, the multiboot header has to be in the first 8KB of the kernel. You could try moving INPUT("start.o") to the very top of the linker script.
? As you posted your reply only a minute after I posted mine, you might have missed it.
Kieran
Member
Member
Posts: 54
Joined: Mon Apr 11, 2005 11:00 pm

Post by Kieran »

yes nick, i did see your reply, i have made sure that my start code is in the first 8kb of the code.
It now compiles fine.

Thankyou all for your help
Post Reply