From: Kele Zhang <zhangcola2003@gmail.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v2 0/1] Enable Dead Code Elimination
Date: Thu, 29 Aug 2024 20:11:58 +0000 [thread overview]
Message-ID: <cover.1724959010.git.zhangcola2003@gmail.com> (raw)
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
next reply other threads:[~2024-08-29 20:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 20:11 Kele Zhang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1724959010.git.zhangcola2003@gmail.com \
--to=zhangcola2003@gmail.com \
--cc=opensbi@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox