Use -ffunction-sections and --gc-sections
commit978058442db039c0933d980de7486f93414ed1c0
authorJakub Jermar <jakub@jermar.eu>
Mon, 5 Jun 2017 16:21:21 +0000 (5 18:21 +0200)
committerJakub Jermar <jakub@jermar.eu>
Mon, 5 Jun 2017 16:21:21 +0000 (5 18:21 +0200)
tree3258d9a7b44285edcc668c8fdc0fa204aa0c1c16
parent7a995075ee9ad9adbfafd2610997bc6f56b8916e
Use -ffunction-sections and --gc-sections

This change results in vast reduction of binary image sizes. For example, the
amd64 ISO image was 38MiB before this change and is only 25MiB after the change.

Unfortunately the ia64 linker ignores --gc-sections for some reason so it cannot
be turned on globally.
uspace/Makefile.common
uspace/lib/c/arch/amd64/Makefile.common
uspace/lib/c/arch/arm32/Makefile.common
uspace/lib/c/arch/ia32/Makefile.common
uspace/lib/c/arch/mips32/Makefile.common
uspace/lib/c/arch/mips32eb/Makefile.common
uspace/lib/c/arch/ppc32/Makefile.common
uspace/lib/c/arch/sparc64/Makefile.common