[fpc-devel] Binary size discrepancy with -a
Sven Barth
pascaldragon at googlemail.com
Sun Jul 19 09:20:32 CEST 2020
J. Gareth Moreton <gareth at moreton-family.com> schrieb am So., 19. Juli
2020, 05:09:
> Hi everyone,
>
> I've noticed something a bit weird with the Free Pascal Compiler when
> you use the the -a option to dump the compiled assembly files... the
> resultant binaries are sometimes smaller. I recently tried it with
> Lazarus under x86_64-win64 (using "make distclean all install" with
> FPCOPT):
>
> (-O4 -OoCONSTPROP)
> 241,010,289 bytes - lazarus.exe
>
> (-a -O4 -OoCONSTPROP)
> 235,655,062 bytes - lazarus.exe
>
> Anyone else noticed this? Logically, shoudn't the EXE files be
> completely identical?
>
On x86 the difference is that this switches to the external assembler
instead of using the internal one. That can result in differently generated
files. You could compare the generated *.o files or use -Xm to compare the
linker maps.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200719/c8db0e5c/attachment.htm>
More information about the fpc-devel
mailing list