[PATCH v1 09/14] DCE/DSE: inhibit .size directive for SHF_GROUP
Yuan Tan
tanyuan at tinylab.org
Fri Nov 3 09:01:55 PDT 2023
.size directive fails in some functions with SHF_GROUP, this is not
really required for normal building, inhibit it to silence the compiling
failures with SHF_GROUP.
Signed-off-by: Yuan Tan <tanyuan at tinylab.org>
Signed-off-by: Zhangjin Wu <falcon at tinylab.org>
---
Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile b/Makefile
index a4e522b747cb..f67b6e8d2c45 100644
--- a/Makefile
+++ b/Makefile
@@ -936,6 +936,9 @@ endif
# `rustc`'s `-Zfunction-sections` applies to data too (as of 1.59.0).
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections
+ifdef CONFIG_SECTION_SHF_GROUP_SUPPORT
+KBUILD_CFLAGS_KERNEL += -finhibit-size-directive
+endif
KBUILD_RUSTFLAGS_KERNEL += -Zfunction-sections=y
LDFLAGS_vmlinux += --gc-sections
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION_DEBUG
--
2.34.1
More information about the linux-riscv
mailing list