sh: Ignore R_SH_NONE module relocations.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 23 May 2011 08:09:30 +0000 (17:09 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 23 May 2011 08:09:30 +0000 (17:09 +0900)
Some modules may end up with R_SH_NONE relocs with the right combination
of compiler/kernel config (specifically dwarf unwinder), so simply trap
and ignore them instead of letting them get down to the error path.

Reported-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/module.c

index ae0be697a89e4b220f527a2bdb34f4da7ec7d318..19b1f8826aef9ba9b2508d71db05f6d8b178b772 100644 (file)
@@ -93,6 +93,8 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
 #endif
 
                switch (ELF32_R_TYPE(rel[i].r_info)) {
+               case R_SH_NONE:
+                       break;
                case R_SH_DIR32:
                        value = get_unaligned(location);
                        value += relocation;