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