Browse Source

sh: Ignore R_SH_NONE module relocations.

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>
Paul Mundt 14 years ago
parent
commit
78207ffd0e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      arch/sh/kernel/module.c

+ 2 - 0
arch/sh/kernel/module.c

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