[fpc-pascal] Optimizing code generation fpc (lazarus)?

Jonas Maebe jonas at freepascal.org
Sun May 17 11:42:29 CEST 2020

On 17/05/2020 11:18, Bo Berglund via fpc-pascal wrote:
> So now I wonder if there is a way to compile the application where the
> compiler will not touch functions that are not used in the current
> project?


> ------------------------
> Is there a way to find out which functions in a particular unit are
> called from the other units in the project?

When compiles, you can tell the linker to generate a linker map with the
-Xm parameter, and then you can see all the (mangled) names of the
referenced symbols (variables, functions, rtti, internally generated
constants, ...). I'm sure Delphi can also generate a linker map with
that information.


More information about the fpc-pascal mailing list