nalika / rpms / grub2

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