[Lazarus] FPC on Rpi3 executable module sizes

Ken Kashmarek kashken at csteldridge.com
Sun Oct 30 08:05:02 CET 2016

I have a group of programs that compile using FPC on Windows 7.  I have
ported those programs over to my RPi3 and they all compile fine.

On Windows 7, the executable files are significantly smaller (less 100K)
than those from the IDE on RPi3 (all 400K & larger). There may be ways to
reduce these sizes.  However, it seems that linking on the RPi3 is not as
advanced as on Windows (it looks like the entire library is being included
rather than just the invoked modules). 

Here is a quick comparison of one program:

On Windows 7 (output from the dir command):
10/29/2016  08:00 AM            97,792 hello.exe
10/29/2016  08:00 AM            14,191 hello.o
10/20/2016  01:25 PM             5,162 hello.pas

On RPi3 (output from ls -l):
-rwxr-xr-x 1 pi pi  408892 Oct 29 07:47 hello
-rw-r--r--   1 pi pi    12876 Oct 29 07:47 hello.o
-rw-r-----   1 pi pi     5164 Oct 29 07:47 hello.pas

The executable file sizes are rather extreme for programs tha run from an
terminal session.  The output from execution is the same.  

I have turned off a number of options that could have been contributing to
this issue (such as eliminaing debug code and symbols).

Any possible considerations for the size difference?

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/FPC-on-Rpi3-executable-module-sizes-tp4050126.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

More information about the Lazarus mailing list