diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-09-19 20:26:24 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2019-10-01 12:46:48 +0200 |
commit | 470d5c445e11dfa8443a5bc1d7dd5788f5fc5dd2 (patch) | |
tree | b8c76248d132092920d2a9d5ee55c3893467e009 /kexec/arch/hppa/kexec-elf-rel-hppa.c | |
parent | b54816eff272324320c490d62dc36b27d2838732 (diff) |
kexec: add support for PARISC architecture
This patch adds support for the parisc Architecture. kexec support
for parisc is included with linux-5.4.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/hppa/kexec-elf-rel-hppa.c')
-rw-r--r-- | kexec/arch/hppa/kexec-elf-rel-hppa.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/kexec/arch/hppa/kexec-elf-rel-hppa.c b/kexec/arch/hppa/kexec-elf-rel-hppa.c new file mode 100644 index 0000000..661b67b --- /dev/null +++ b/kexec/arch/hppa/kexec-elf-rel-hppa.c @@ -0,0 +1,37 @@ +/* + * kexec-elf-rel-hppa.c - kexec Elf relocation routines + * + * Copyright (C) 2019 Sven Schnelle <svens@stackframe.org> + * + * This source code is licensed under the GNU General Public License, + * Version 2. See the file COPYING for more details. +*/ + +#include <stdio.h> +#include <elf.h> +#include "../../kexec.h" +#include "../../kexec-elf.h" + +int machine_verify_elf_rel(struct mem_ehdr *ehdr) +{ + if (ehdr->ei_data != ELFDATA2MSB) + return 0; + if (ehdr->e_machine != EM_PARISC) + return 0; + return 1; +} + +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), + struct mem_sym *UNUSED(sym), + unsigned long r_type, + void *UNUSED(location), + unsigned long UNUSED(address), + unsigned long UNUSED(value)) +{ + switch (r_type) { + default: + die("Unknown rela relocation: %lu\n", r_type); + break; + } + return; +} |