But! What does fpc do with that? I have tried to trace it to system.pp , but I don't think that any of the parameter procedures are entered.
inside rtl/linux/system.pas is a line that reads {$I sysunixh.inc} which includes the contents of that include file in(side) the system unit.
The include file itself can be found as /rtl/unix/sysunixh.inc
In there is located following code:
{$if not defined(solaris) and not defined(darwin) and not defined(aix)}
{$ifdef FPC_HAS_INDIRECT_ENTRY_INFORMATION}
var argc:longint;
argv:PPAnsiChar;
envp:PPAnsiChar;
{$else FPC_HAS_INDIRECT_ENTRY_INFORMATION}
var argc:longint;external name 'operatingsystem_parameter_argc';
argv:PPAnsiChar;external name 'operatingsystem_parameter_argv';
envp:PPAnsiChar;external name 'operatingsystem_parameter_envp';
{$endif FPC_HAS_INDIRECT_ENTRY_INFORMATION}
{$endif}
Which tells that the external symbol operatingsystem_parameter_argc is used as storage location for the variable argc, the external symbol operatingsystem_parameter_argv is used as storage location for the variable argv, and the external symbol operatingsystem_parameter_envp is used as storage location for the variable envp.
These variables are documented as
argv,
argc and
envp and can be used anywhere by anyone, including the end user in (pascal) code.
The first sign of usage is inside unit system in function
ParamStr (argv) and function
ParamCount (argc). Since you shared to not have envp, I do not mention it. Keep it nil should do the trick.
That means that you won't see immediate/direct usage of the symbols operatingsystem_parameter_xxx (as for the most time it is (indirectly) accessed (it does get directly accessed a few times in the startup code inside unit system.pas).
regards,