Commit 7cd0378e authored by Paul Mundt's avatar Paul Mundt

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 1031a3a5
...@@ -90,7 +90,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, ...@@ -90,7 +90,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
* SHmedia, the LSB of the symbol needs to be asserted * SHmedia, the LSB of the symbol needs to be asserted
* for the CPU to be in SHmedia mode when it starts executing * for the CPU to be in SHmedia mode when it starts executing
* the branch target. */ * the branch target. */
relocation |= (sym->st_other & 4); relocation |= !!(sym->st_other & 4);
#endif #endif
switch (ELF32_R_TYPE(rel[i].r_info)) { switch (ELF32_R_TYPE(rel[i].r_info)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment