[fpc-pascal] Smart-linking versus Whole Program Optimization

Yuriy Sydorov jura at cp-lab.com
Thu Mar 11 09:32:17 CET 2021


On 11.03.2021 1:43, Karoly Balogh via fpc-pascal wrote:
> Hi,
> 
> On Wed, 10 Mar 2021, Yuriy Sydorov via fpc-pascal wrote:
> 
>>> Neither parameter may be necessary on Windows, but that's probably the
>>> only one.
>>
>> Android and MS-DOS targets also ignore -CX -XX
> 
> * when using the internal linker... :) External linkers may be supported
> for these targets, just as for Windows. In this case smartlinking might
> not be, or only supported in the old fashioned way.

Here I've meant ignoring of the -CX -XX options, not the actual implementation of smartlinking.
For Android the external linker is always used and the section based smartlinking is the only option.
For ms-dos by default the wlink linker is used with the library based smartlinking and -CX -XX are also ignored.

> Other targets: m68k doesn't have any internal assembler or linker, but at
> least any target using the vasm/vlink assembler-liker combo also has
> smartlinking enabled, using named sections in the assembler file, and
> vlink's section garbage collection feature. (Similar to what recent GNU LD
> has for ELF.)
> 
> This includes, Amiga, Atari, and the Sinclair QL at least. Some PowerPC
> targets like AmigaOS 4, and MorphOS also supports it.

Sure, building for retro targets can't work at all without smartlinking enabled by default.

Yuriy.


More information about the fpc-pascal mailing list