Skip to content

Enable Dead Code Elimination

Kele Zhang opensbi 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 0 repliesNew
  2. v31 patch 0 repliesSuperseded
  3. v21 patch 0 repliesSuperseded

Changes in v4 from the cover letter

- fix: replace spaces with tabs for consistent indentation
---

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Makefile: enable --gc-sectionsMakefile firmware/fw_base.ldS+10 -62 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchBin MengXiang WAnup Patel
1/1R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/1] Enable Dead Code Elimination

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
v2: https://lists.infradead.org/pipermail/opensbi/2024-August/007301.html
v3: https://lists.infradead.org/pipermail/opensbi/2024-September/007344.html
---
Changes in v2:
- Move --gc-sections to ELFFLAGS
- Remove redundant KEEP()

Changes in v3:
- Move --print-gc-sections to ifneq ($(DEBUG),)
- Move "ifneq ($(DEBUG),)" to the latter part of the Makefile, ensuring
that "ELFFLAGS += $(USE_LD_FLAG)" remains at the beginning.

Changes in v4:
- fix: replace spaces with tabs for consistent indentation
---

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

 Makefile             | 15 +++++++++------
 firmware/fw_base.ldS |  1 +
 2 files changed, 10 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0