Executable size
Thomas Doerfler (nt)
Thomas.Doerfler at imd-systems.de
Wed Dec 23 19:12:24 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Leon,
just guessing:
- - And RTEMS has been split into many small modules: one module per
function instead of one module per subsystem. The idea is that the
linker can then pick in those modules that are required, without unused
code which in turn would pull in additional unused modules.
- - Many RTEMS functions are implemented as inline functions now, in the
respective headers files.
If you compile RTEMS with "-fkeep-inline-functions", then for EACH of
the many RTEMS modules will carry a local copy of ALL inline-functions
visible in its header files.
So you will end up with 100-200 local copies of the inlined functions,
and this may really bloat the overall executable size.
So I don't see a reason for the switch "-fkeep-inline-functions" and I
would guess that it is responsible for your code size increase.
wkr,
Thomas.
Leon Pollak schrieb:
> Thanks for your responses.
> Below is the more detailed study.
>
> 1. Joel, you are right - the optimized version of application and RTEMS is
> even a bit smaller (about 5%).
>
> 2. Debug version (of application & RTEMS) still is 4 times bigger.
> This is the 'size' report for 4.8.0:
> text data bss dec hex filename
> 1093064 20092 298832 1411988 158b94 VDTS
>
> And this is the 'size' for 4.9.3:
> text data bss dec hex filename
> 4050468 14405 298224 4363097 429359 VDTS
>
> All the compilation parameters are exactly the same for both cases, except
> that RTEMS IN BOTH CASES(!) is compiled for debug with:
> CFLAGS_OPTIMIZE_V=-O0 -g -ggdb -fkeep-inline-functions
> for optimized with:
> CFLAGS_OPTIMIZE_V=-O4 -g -ggdb -fno-keep-inline-functions
>
> Thanks again.
- --
- --------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: Thomas.Doerfler at imd-systems.de
PGP public key available at:
http://www.imd-systems.de/pgpkey_en.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFLMmuXwHyg4bDtfjQRAlbIAJ9vv3faoq91IgYbvvRa7ph2bwVoSgCePgMG
EYWXgr8zzUF4L11upPRblLw=
=qLPU
-----END PGP SIGNATURE-----
More information about the users
mailing list