Skip to content

Commit

Permalink
sh: Ignore R_SH_NONE module relocations.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed May 23, 2011
1 parent 116ceec commit 78207ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sh/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 78207ff

Please sign in to comment.