Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable linking libgcc.a with --whole-archive option
This patch disables linking libgcc.a library with --whole-archive in order to make resulting loader-stripped.elf 2.5 MB smaller. The libgcc.a contains number of functions and huge tables of numbers that are part of Decimal Float Library (https://gcc.gnu.org/onlinedocs/gccint/Decimal-float-library-routines.html#Decimal-float-library-routines), which are not used by OSv kernel. Any potential side-effects caused by this patch have been tested against almost 20 different apps including java, python, golang, rust, MySQL and redis and no issues have been found. Size of kernel (ROFS version) before this patch: 9.2M loader-stripped.elf 6.2M lzloader.elf (33% reduction) Size of kernel (ROFS version) after this patch: 6.7M loader-stripped.elf 3.9M lzloader.elf (42% reduction) These are related patches: c9e61d4 be56532 Signed-off-by: Waldemar Kozaczuk <[email protected]> Message-Id: <[email protected]>
- Loading branch information