[PATCH 0/2] Enable Dead Code Elimination
Kele Zhang
1952088712 at qq.com
Sat Aug 24 01:14:07 PDT 2024
This patch enables `--gc-sections`. Dead Code Elimination (DCE) can
reduce binary size and the attack surface without introducing side
effects, and it has been used in the Linux kernel for many years.
After testing, enabling DCE does not affect the normal functionality of
OpenSBI.
Kele Zhang (2):
Makefile: enable --gc-sections
Makefile: Remove -g from default CFLAGS
Makefile | 4 ++--
firmware/fw_base.ldS | 1 +
firmware/fw_payload.elf.ldS | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
--
2.34.1
More information about the opensbi
mailing list