bypass check on interp program header for ppc64le

The zImage boot wrapper on 64bit little endian is linked as a
position independant executable and has a interp elf program
header.

The following patch skips the check on the elf interp program
header for all PPC 64bit little endian executable files. It
should not be harmful to bypass this check for vmlinux little
endian executable files as well.

Another alternative to this patch would be to remove the whole
test on the interp elf program header as  kexec seems to be
ignoring the information after all.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
ppc64: add a find_section service

This service will be later used to look for the section containing
the compressed vmlinux in a zImage.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
ppc64: add a service to unzip and load a compressed vmlinux

The zImage* executable files on ppc64 use a special section called
".kernel:vmlinux.strip" which contains a compressed vmlinux executable
file.

This patch adds a service to detect and unzip such a section in a
user space buffer of the kexec process. The buffer will then be used
to feed the elf_ppc64_load() routine to load the uncompressed
vmlinux.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
ppc64: detect zImage files and load the uncompressed vmlinux

This patch detects zImage* executable files when a ppc64 elf executable is
being loaded. If needed, the vmlinux contained in the section
".kernel:vmlinux.strip" is uncompressed in a malloc'ed buffer and then used
to re-feed elf_ppc64_load().

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
ppc64: fix unused variable compile warnings

../kexec/arch/ppc64/kexec-elf-ppc64.c:100:19: warning: variable ‘modified_cmdline_len’ set but not used [-Wunused-but-set-variable]
  int cmdline_len, modified_cmdline_len;
                   ^
../kexec/arch/ppc64/kexec-elf-ppc64.c:100:6: warning: variable ‘cmdline_len’ set but not used [-Wunused-but-set-variable]
  int cmdline_len, modified_cmdline_len;

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
ppc64: remove dead code in kexec-zImage-ppc64

This code was never used.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
ppc64: fix implicit declaration compile warnings

../kexec/arch/ppc64/kexec-ppc64.c: In function ‘get_devtree_details’:
../kexec/arch/ppc64/kexec-ppc64.c:414:5: warning: implicit declaration of function ‘reserve’ [-Wimplicit-function-declaration]
     reserve(KDUMP_BACKUP_LIMIT, crash_base-KDUMP_BACKUP_LIMIT);
     ^
../kexec/arch/ppc64/crashdump-ppc64.c: In function ‘load_crashdump_segments’:
../kexec/arch/ppc64/crashdump-ppc64.c:391:2: warning: implicit declaration of function ‘reserve’ [-Wimplicit-function-declaration]
  reserve(info->backup_start, sz);
  ^

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
ppc64: fix unused variable compile warning

../kexec/arch/ppc64/crashdump-ppc64.c: In function ‘get_crash_memory_ranges’:
../kexec/arch/ppc64/crashdump-ppc64.c:186:6: warning: unused variable ‘i’ [-Wunused-variable]
  int i, n, crash_rng_len = 0;

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>