elfdump: Fix architecture setup

This assignment was forgotten in
commit 53b165a568a4f5e93036bf96f30712ab7808e9e7

(Only 32-bit ELF files were adjusted, not 64-bit ones.)

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Make kdump_set_arch return a status code

This function currently cannot fail (always returns kdump_ok), but let's
split this change from a commit that needs error handling.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
live source: use kdump_set_arch()

Let's use the same unified access for live sources: kdump_set_arch()
may be extended, and it's a pain to keep updating devmem.c as a special
case.

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

This structure will contain operations that do not depend on the
target file format, but do depend on the target architecture.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Generic handling of NT_PRSTATUS notes

The content of this note is arch-specific, so we'll need arch-specific
helpers to process it. Add this function to arch_ops.

There are no arch_ops defined, so this commit itself does nothing.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
NT_PRSTATUS handling for x86_64

Parse and store relevant data from NT_PRSTATUS notes on x86_64. Note
that this is currently write-only data.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Use NT_PRSTATUS notes to count CPUs in the target system

Since each online CPU has its own NT_PRSTATUS note, their number
can be determined simply by counting them.

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

Provide an API to read register values from the ELF notes.

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