Permission to change wiki.osdev.org/Pascal_Bare_Bones
Posted: Fri Jan 27, 2012 6:17 pm
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.
-CX - Create a smartlinked library
-XXs - Create smart link unit and strip all symbols from executable
and
--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/ind ... l#msg85788
thanks
to moderator: "ups... sory ,,, i think it's should be move to wiki board"
I want to make some correction to compiling method.
it's must befpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -Rintel -Tlinux kernel.pas
Code: Select all
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -Rintel -Tlinux kernel.pas -CX -XXs
-XXs - Create smart link unit and strip all symbols from executable
and
it's must beld -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
Code: Select all
ld --gc-sections -s -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
-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/ind ... l#msg85788
thanks
to moderator: "ups... sory ,,, i think it's should be move to wiki board"