|
|
fd0330 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
fd0330 |
From: Peter Jones <pjones@redhat.com>
|
|
|
fd0330 |
Date: Thu, 24 Feb 2022 16:40:11 -0500
|
|
|
fd0330 |
Subject: [PATCH] modules: strip .llvm_addrsig sections and similar.
|
|
|
fd0330 |
|
|
|
fd0330 |
Currently grub modules built with clang or gcc have several sections
|
|
|
fd0330 |
which we don't actually need or support.
|
|
|
fd0330 |
|
|
|
fd0330 |
We already have a list of section to skip in genmod.sh, and this patch
|
|
|
fd0330 |
adds the following sections to that list (as well as a few newlines):
|
|
|
fd0330 |
|
|
|
fd0330 |
.note.gnu.property
|
|
|
fd0330 |
.llvm*
|
|
|
fd0330 |
|
|
|
fd0330 |
Note that the glob there won't work without a new enough linker, but the
|
|
|
fd0330 |
failure is just reversion to the status quo, so that's not a big problem.
|
|
|
fd0330 |
|
|
|
fd0330 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
fd0330 |
---
|
|
|
fd0330 |
grub-core/genmod.sh.in | 5 ++++-
|
|
|
fd0330 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
fd0330 |
|
|
|
fd0330 |
diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
|
|
|
fd0330 |
index 1250589b3f..c2c5280d75 100644
|
|
|
fd0330 |
--- a/grub-core/genmod.sh.in
|
|
|
fd0330 |
+++ b/grub-core/genmod.sh.in
|
|
|
fd0330 |
@@ -57,8 +57,11 @@ if test x@TARGET_APPLE_LINKER@ != x1; then
|
|
|
fd0330 |
@TARGET_STRIP@ --strip-unneeded \
|
|
|
fd0330 |
-K grub_mod_init -K grub_mod_fini \
|
|
|
fd0330 |
-K _grub_mod_init -K _grub_mod_fini \
|
|
|
fd0330 |
- -R .note.gnu.gold-version -R .note.GNU-stack \
|
|
|
fd0330 |
+ -R .note.GNU-stack \
|
|
|
fd0330 |
+ -R .note.gnu.gold-version \
|
|
|
fd0330 |
+ -R .note.gnu.property \
|
|
|
fd0330 |
-R .gnu.build.attributes \
|
|
|
fd0330 |
+ -R '.llvm*' \
|
|
|
fd0330 |
-R .rel.gnu.build.attributes \
|
|
|
fd0330 |
-R .rela.gnu.build.attributes \
|
|
|
fd0330 |
-R .eh_frame -R .rela.eh_frame -R .rel.eh_frame \
|