aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-09 05:03:37 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-05-09 05:03:37 -0400
commit7cd0378ef4c0d7b05e7dcb1daa115b841ffdc31a (patch)
tree87f98b88f23a9f0846268afa243278fd17b68065
parent1031a3a57ed76f5cb8754a89ddb22f3d9ebe8861 (diff)
sh: Fix up SHmedia module ELF relocations.
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>
-rw-r--r--arch/sh/kernel/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c
index c43081039dd5..c19b0f7d2cc1 100644
--- a/arch/sh/kernel/module.c
+++ b/arch/sh/kernel/module.c
@@ -90,7 +90,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
90 * SHmedia, the LSB of the symbol needs to be asserted 90 * SHmedia, the LSB of the symbol needs to be asserted
91 * for the CPU to be in SHmedia mode when it starts executing 91 * for the CPU to be in SHmedia mode when it starts executing
92 * the branch target. */ 92 * the branch target. */
93 relocation |= (sym->st_other & 4); 93 relocation |= !!(sym->st_other & 4);
94#endif 94#endif
95 95
96 switch (ELF32_R_TYPE(rel[i].r_info)) { 96 switch (ELF32_R_TYPE(rel[i].r_info)) {