[fpc-pascal] Symbols in binary

Adriaan van Os adriaan at adriaan.biz
Mon Oct 19 14:17:10 CEST 2026


Consider the following test program:

program symbols;
var
stat: TFPCHeapStatus;
begin
stat := GetFPCHeapStatus;
   writeln( 'FPC FPCHeapStatus.CurrHeapUsed = ', stat.CurrHeapFree)
end.

When I compile it with -XX- -Xs, there is a string "TFPCHeapStatus" in a 
Mach-O (__TEXT, __const) section. When I compile it with -XX, the string 
"TFPCHeapStatus" in not in that same Mach-O (__TEXT, __const) section, 
nor anywhere else. Is that expected behaviour ? And how do I get rid of 
unnecessary symbols like "TFPCHeapStatus" when not smart-linking ?

Regards,

Adriaan van Os
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20261019/4a63bccb/attachment.htm>


More information about the fpc-pascal mailing list