Blame SOURCES/0274-Strip-.ARM.exidx.patch

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