[fpc-devel] Smart-linking on linux/x86-64

Sven Barth pascaldragon at googlemail.com
Mon Jul 4 23:37:20 CEST 2022


Am 04.07.2022 um 19:52 schrieb Joost van der Sluis via fpc-devel:
> Hi all,
>
> I have a very small application, see below. One procedure is not 
> called at all.
>
> But when I compile with
>
> ppcx64 -XX -CX testcfi.pp
>
> The P$TESTCFI_$$_NEVERCALLES symbol is still in the executable.
>
> On Windows (internal linker) this code is omitted from the executable, 
> but not on Linux.
>
> Does anyone know why?

I can't reproduce this with main. But considering that you named the 
test file “testcfi”: do you by chance play around with DWARF data? Cause 
DWARF doesn't support smartlinking on non-Windows, at least not in the 
way FPC generates it...

Regards,
Sven


More information about the fpc-devel mailing list