aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-05-23 04:09:30 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-05-23 04:09:30 -0400
commit78207ffd0e00d39238f0a8a455a31a12659b30b3 (patch)
treea4d9fc2c682a39c1016a2c29de5633fa7873ed32 /arch/sh
parent116ceec20069f5bab507eab817e56a4b60480845 (diff)
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>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c
index ae0be697a89e..19b1f8826aef 100644
--- a/arch/sh/kernel/module.c
+++ b/arch/sh/kernel/module.c
@@ -93,6 +93,8 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
93#endif 93#endif
94 94
95 switch (ELF32_R_TYPE(rel[i].r_info)) { 95 switch (ELF32_R_TYPE(rel[i].r_info)) {
96 case R_SH_NONE:
97 break;
96 case R_SH_DIR32: 98 case R_SH_DIR32:
97 value = get_unaligned(location); 99 value = get_unaligned(location);
98 value += relocation; 100 value += relocation;