Move ptr_size to common context

The architecture pointer size is generally useful, so let's move it to
the common data.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Fix arch and ptr_size for LKCD and diskdump

The architecture and pointer size must be determined from the machine
name for these file formats. This requires a new utility function.


Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Recognize aarch64 as a machine name

This only recognizes the machine name, no real aarch64 support is
provided by this change.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Fix arch and endian for live source

The architecture can be determined at compile time. Since I don't have
access to all architectures, I only hope that I got all preprocessor
macros right...

Note that I always check the 64-bit architecture first. I'm not sure,
but some compilers may define both the 32-bit and 64-bit variant when
compiling for a given 64-bit target.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Move ELF notes processing to a separate file

This is needed to allow code reuse by diskdump (recent versions of
makedumpfile store the complete ELF notes in the file).

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Use vmcoreinfo row access functions during initialisation

Since there are already convenience functions, let's use them to make
the code more readable.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
diskdump: clean up interface to read_bitmap()

Use kdump_status, like everywhere else.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Support ELF notes in diskdump

Recent versions of makedumpfile save a copy of the ELF notes in the
subheader area. Let's reuse the ELF parser and read this information.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
diskdump: Read VMCOREINFO from version 3 files

KDUMP version 3 does not store all ELF notes, but it does store a copy
of VMCOREINFO. Let's process it if available.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>