diff options
author | Maciej W. Rozycki <macro@mips.com> | 2018-03-22 17:30:41 +0100 |
---|---|---|
committer | James Hogan <jhogan@kernel.org> | 2018-03-22 23:30:58 +0100 |
commit | 27c524d1743047258f9a6a2ad813f54d35c1f8e8 (patch) | |
tree | 843f31412ad7100e2bee0fa4f6ecc90a77fd7b7a /arch/mips/boot | |
parent | MAINTAINERS: Add entry for Microsemi MIPS SoCs (diff) | |
download | linux-27c524d1743047258f9a6a2ad813f54d35c1f8e8.tar.xz linux-27c524d1743047258f9a6a2ad813f54d35c1f8e8.zip |
MIPS: Use the entry point from the ELF file header
In order to fetch the correct entry point with the ISA bit included, for
use by non-ELF boot loaders, parse the output of `objdump -f' for the
start address recorded in the kernel executable itself, rather than
using `nm' to get the value of the `kernel_entry' symbol.
Sign-extend the address retrieved if 32-bit, so that execution is
correctly started on 64-bit processors as well. The tool always prints
the entry point using either 8 or 16 hexadecimal digits, matching the
address width (aka class) of the ELF file, even in the presence of
leading zeros.
Signed-off-by: Maciej W. Rozycki <macro@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18912/
Signed-off-by: James Hogan <jhogan@kernel.org>
Diffstat (limited to 'arch/mips/boot')
0 files changed, 0 insertions, 0 deletions