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

Michael Van Canneyt michael at freepascal.org
Mon Jul 4 21:11:16 CEST 2022



On Mon, 4 Jul 2022, Joost van der Sluis via fpc-devel wrote:

> 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.

It's omitted here as well:

> objdump -t a | grep -i TESTCFI_
00000000004010d0 g     F .text	000000000000000e P$TESTCFI_$$_NOSTACKFRAME
0000000000401080 g     F .text	0000000000000047 P$TESTCFI_$$_JOJO


Michael.


More information about the fpc-devel mailing list