]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: ELF: fix loading o32 binaries on 64-bit kernels
authorJames Cowgill <James.Cowgill@imgtec.com>
Wed, 14 Jan 2015 16:37:14 +0000 (16:37 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 15 Jan 2015 14:59:28 +0000 (15:59 +0100)
commit72535777898f00a533984977dd1ad9405a60da38
tree056173b335eb214efeec4aab99fd4b2e18b4da2b
parent1ebc389226226d8f84624e2772ae9cf127a2c099
MIPS: ELF: fix loading o32 binaries on 64-bit kernels

Commit 7bda7db59413 ("MIPS: ELF: Set FP mode according to .MIPS.abiflags")
introduced checking of the .MIPS.abiflags ELF section but did so through
the native sized "elfhdr" and "elf_phdr" structures regardless whether the
ELF was actually 32-bit or 64-bit. This produces wrong results when trying
to use a 64-bit kernel to load o32 ELF files.

Change the uses of the generic elf structures to their 32-bit versions.
Since the code bails out on any 64-bit cases, this is OK until they are
implemented.

Fixes: 7bda7db59413 ("MIPS: ELF: Set FP mode according to .MIPS.abiflags")
Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/8932/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/elf.c