nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone
4fe85b
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
4fe85b
From: Vladimir Serbinenko <phcoder@gmail.com>
4fe85b
Date: Thu, 31 Dec 2015 18:13:59 +0100
4fe85b
Subject: [PATCH] Strip .ARM.exidx
4fe85b
4fe85b
This section is generated by clang and is useful only for debugging.
4fe85b
It contains exotic relocations, so strip them to avoid them interferring
4fe85b
with module loading.
4fe85b
---
4fe85b
 gentpl.py              | 2 +-
4fe85b
 grub-core/genmod.sh.in | 2 +-
4fe85b
 2 files changed, 2 insertions(+), 2 deletions(-)
4fe85b
4fe85b
diff --git a/gentpl.py b/gentpl.py
4fe85b
index 889cc91d39c..58430fcd236 100644
4fe85b
--- a/gentpl.py
4fe85b
+++ b/gentpl.py
4fe85b
@@ -753,7 +753,7 @@ def image(defn, platform):
4fe85b
 if test x$(TARGET_APPLE_LINKER) = x1; then \
4fe85b
   $(MACHO2IMG) $< $@; \
4fe85b
 else \
4fe85b
-  $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $< $@; \
4fe85b
+  $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; \
4fe85b
 fi
4fe85b
 """)
4fe85b
 
4fe85b
diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
4fe85b
index 7dcafd9d370..005cb198504 100644
4fe85b
--- a/grub-core/genmod.sh.in
4fe85b
+++ b/grub-core/genmod.sh.in
4fe85b
@@ -58,7 +58,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; then
4fe85b
 		-K grub_mod_init -K grub_mod_fini \
4fe85b
 		-K _grub_mod_init -K _grub_mod_fini \
4fe85b
 		-R .note.gnu.gold-version -R .note.GNU-stack \
4fe85b
-		-R .note -R .comment $tmpfile || exit 1
4fe85b
+		-R .note -R .comment -R .ARM.exidx $tmpfile || exit 1
4fe85b
 	fi
4fe85b
 	if ! test -z "${TARGET_OBJ2ELF}"; then
4fe85b
 	    "${TARGET_OBJ2ELF}" $tmpfile || exit 1