OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Enable Dead Code Elimination
@ 2024-08-29 20:11 Kele Zhang
  2024-08-29 20:12 ` [PATCH v2 1/1] Makefile: enable --gc-sections Kele Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Kele Zhang @ 2024-08-29 20:11 UTC (permalink / raw)
  To: opensbi

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.

---
v1: https://lists.infradead.org/pipermail/opensbi/2024-August/007286.html

---
Changes in v2:
- Move --gc-sections to ELFFLAGS
- Remove redundant KEEP() 

Kele Zhang (1):
  Makefile: enable --gc-sections

 Makefile             | 5 +++--
 firmware/fw_base.ldS | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)


base-commit: c4940a9517486413cd676fc8032bb55f9d4e2778
-- 
2.34.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-01 12:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 20:11 [PATCH v2 0/1] Enable Dead Code Elimination Kele Zhang
2024-08-29 20:12 ` [PATCH v2 1/1] Makefile: enable --gc-sections Kele Zhang
2024-08-30 16:13   ` Xiang W
2024-09-01 11:12   ` Bin Meng
2024-09-01 11:51     ` cola zhang
2024-09-01 12:14       ` Xiang W
2024-09-01 12:35         ` cola zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox