Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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)) {