on current
http://wiki.osdev.org/Pascal_Bare_Bones, free pascal include RTTI and debug information to binary output kernel. It's useless and the kernel going to big.
I want to make some correction to compiling method.
Quote:
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -Rintel -Tlinux kernel.pas
it's must be
Code:
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -Rintel -Tlinux kernel.pas -CX -XXs
-CX - Create a smartlinked library
-XXs - Create smart link unit and strip all symbols from executable
and
Quote:
ld -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
it's must be
Code:
ld --gc-sections -s -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
--gc-sections - Remove unused sections
-s - strip all symbols
maybe somebody help me to change it.
I don't have wiki account.
we have discussed this in
http://forum.lazarus.freepascal.org/index.php/topic,15880.msg85788.html#msg85788thanks
to moderator: "ups... sory
,,, i think it's should be move to wiki board"