For FPC the smallest RTL you can get(without ugly hacks or using Crinkler) is this:
system.pas
Code:
unit system;
interface
type
HResult = longint;
implementation
procedure FPC_INITIALIZEUNITS; nostackframe; [public, alias: 'FPC_INITIALIZEUNITS'];
begin
end;
procedure FPC_DO_EXIT; nostackframe; [public, alias: 'FPC_DO_EXIT'];
begin
end;
end.
sysinitpas.pas
Code:
unit sysinitpas;
interface
implementation
procedure PASCALMAIN; external name 'PASCALMAIN';
procedure ExitProcess(ExitCode: longint); stdcall; external 'kernel32.dll' name 'ExitProcess';
procedure Entry; [public, alias: '_mainCRTStartup'];
begin
PASCALMAIN;
ExitProcess(0);
end;
end.
fpintres.pas
Code:
unit fpintres;
interface
implementation
end.
With Crinkler you can easily get below 1kb if you craft some proper RTL units
Bookmarks