Plugin load failures after enabling Smart Linker in Delphi service builds
0 reputation · 16 Apr 2025, 09:46 UTC
Plugin load failures after enabling Smart Linker in Delphi service builds
The goal is to reduce the executable size and memory footprint of a low‑traffic Delphi service by enabling the Smart Linker, while still allowing dynamically loaded plugins to access the required RTTI and class information.
However, the Smart Linker may treat units that are only referenced through RTTI as unused and remove them, leading to missing symbols when plugins are loaded at runtime. This creates uncertainty about which units must be preserved and whether the default smart‑linking settings are safe for plugin‑based architectures.
Which linker options or directives can preserve RTTI for dynamically loaded units while still removing truly unused code?
How can we automatically detect which units contain required RTTI before enabling aggressive smart linking?
Is there a way to selectively disable smart linking for specific units or packages without disabling it globally?