Page 1 of 1

linking

Posted: Tue Oct 21, 2003 3:40 am
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?

Re:linking

Posted: Tue Oct 21, 2003 5:13 am
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.

Re:linking

Posted: Tue Oct 21, 2003 7:40 am
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 ...

Re:linking

Posted: Wed Oct 22, 2003 2:26 pm
by RuneOfFire
Just so you know, it should be -Wall, not -Wal (-Wall displays all warnings, -Wal isn't valid)