Weird 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.
Post Reply
beyondsociety

Weird linking problem

Post by beyondsociety »

I have a wierd problem when compiling my code and was wondering if anybody knew why.

I assemble my bootloader to binary using nasm and I then assemble my entry point file. When I use "aout" it doesn't print anything to the screen when linked with my C kernel.

But if I use "coff" It does print a message to the screen when linked with my C kernel but it complains about there not being a entry point in my code.

ex: start not found, defaulting to 00100000 as entry point.

I also noticed if I use "coff-go32" as my output for the linker script, I also get nothing on the screen, but if I use "binary" all goes well.

Weird huh? Could it be that because I'm using DJGPP and the "aout" for DJGPP is different from the "aout" for Linux?
Therx

Re:Weird linking problem

Post by Therx »

I'm not entirly sure what you mean and I don't use AOUT, COFF or ELF but if you are just loading the kernel to memory and then jumping to it then you will need to have the entry point at the start. (BINARY) When it comlains aout an entry point all you need is to add ENTRY("dkfhskfh"); to the top of your linker script replacing the random stuff with the name of the entry point sub routine or what ever
beyondsociety

Re:Weird linking problem

Post by beyondsociety »

Didn't help.

If I assemble it as "aout" it doesn't give me the "missing entry point" but it doesn't print anything to the screen. If I assemble it as "coff" I get that warning, and it displays the message.

What else could be the problem? Possibly DJGPP with using coff and aout?
Post Reply