]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Strip .ARM.exidx
authorVladimir Serbinenko <phcoder@gmail.com>
Thu, 31 Dec 2015 17:13:59 +0000 (18:13 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Thu, 31 Dec 2015 17:13:59 +0000 (18:13 +0100)
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.

conf/Makefile.common
gentpl.py
grub-core/genmod.sh.in

index 5083d5f1e167095668b1223bba58679435729c3c..11296b550a7cd40ded498613620f556d78c67d84 100644 (file)
@@ -38,7 +38,7 @@ CFLAGS_KERNEL = $(CFLAGS_PLATFORM) -ffreestanding
 LDFLAGS_KERNEL = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC)
 CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) -DGRUB_KERNEL=1
 CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
-STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags
+STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx
 
 CFLAGS_MODULE = $(CFLAGS_PLATFORM) -ffreestanding
 LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
index 76971d3cece2f239e08284c07666c4c7c578c158..0782e447d2a1d5bb862bd1f55690e6ffd42909de 100644 (file)
--- a/gentpl.py
+++ b/gentpl.py
@@ -759,7 +759,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 .MIPS.abiflags -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
 """)
 
index 7dcafd9d370d63dbd09eb71c0d8062b197ca796c..005cb198504d5d53ca1b499bd943640a40ddec68 100644 (file)
@@ -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