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

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