linking

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
guest

linking

Post by guest »

Hi,
when i compile kernel with these flags
CPPFLAGS = -ffreestanding -nostdlib -fno-builtin -fno-rtti -fno-exceptions -Wal
kernel compiles and runs, but when i want to compile it with CPPFLAGS = -ffreestanding -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fwritable-strings -Wal
everything compiles but kernel doesn't boot.
why?
Tim

Re:linking

Post by Tim »

Because the strings have been moved to the .data section (this is what -fwritable-strings does). So this is affecting your kernel in some way.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:linking

Post by Pype.Clicker »

i suspect that your bootstrapping asm("jmp kmain") instruction is no longer at the very start of your kernel image or something ...
RuneOfFire

Re:linking

Post by RuneOfFire »

Just so you know, it should be -Wall, not -Wal (-Wall displays all warnings, -Wal isn't valid)
Post Reply