I want to make some correction to compiling method.
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -Rintel -Tlinux kernel.pas
it's must be
Code: Select all
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
ld -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
it's must be
Code: Select all
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#msg85788
thanks
to moderator: "ups... sory ,,, i think it's should be move to wiki board"