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.
Hi,
Now I'm trying to develop 64-bit OS. But I got a strange thing when compiling: When I use x86_64-elf-gcc or x86_64-elf-ld, GRUB shown this error:
When I change to system compiler, it's back to normal. Can anyone explain this for me?
It's impossible to say what the problem is without seeing your code, your linker file, and the exact commands you are using. Can you link to an on-line repository of your code. Something in this thread may help: viewtopic.php?f=1&t=33521
iansjack wrote:It's impossible to say what the problem is without seeing your code, your linker file, and the exact commands you are using. Can you link to an on-line repository of your code. Something in this thread may help: viewtopic.php?f=1&t=33521
Here is my repo: https://github.com/NeonLightions/Amore-OS-x64. The header is at src/boot/grub/header.S, the _start function is at src/sys/_start.S and the linker is at scripts/linker.ld
Octocontrabass wrote:That's the wrong LD. Also, you might need to use "-z max-page-size=0x1000" to tell LD that it shouldn't add a bunch of padding to your kernel.