Skip to content

Commit

Permalink
sh: Fix up SHmedia module ELF relocations.
Browse files Browse the repository at this point in the history
This fixes up the LSB setting for SHmedia branching in updated symbols
when processing module relocations.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed May 9, 2009
1 parent 1031a3a commit 7cd0378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
* SHmedia, the LSB of the symbol needs to be asserted
* for the CPU to be in SHmedia mode when it starts executing
* the branch target. */
relocation |= (sym->st_other & 4);
relocation |= !!(sym->st_other & 4);
#endif

switch (ELF32_R_TYPE(rel[i].r_info)) {
Expand Down

0 comments on commit 7cd0378

Please sign in to comment.