diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-05-20 13:39:45 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-11 10:10:28 -0400 |
commit | 24aeeace7a9f264688e9eda77b6c04db607cbdfd (patch) | |
tree | f85cb83725c609b8dd255dbfe48143540349bbff /qapi/qmp-registry.c | |
parent | 2f859f80c2077e00237ea1dfae2523ebd8377f5f (diff) | |
download | qemu-24aeeace7a9f264688e9eda77b6c04db607cbdfd.zip qemu-24aeeace7a9f264688e9eda77b6c04db607cbdfd.tar.gz qemu-24aeeace7a9f264688e9eda77b6c04db607cbdfd.tar.bz2 |
dump: select header bitness based on ELF class, not ELF architecture
The specific ELF architecture (d_machine) carries Too Much Information
(TM) for deciding between create_header32() and create_header64(), use
"d_class" instead (ELFCLASS32 vs. ELFCLASS64).
This change adapts write_dump_header() to write_elf_loads(), dump_begin()
etc. that also rely on the ELF class of the target for bitness selection.
Considering the current targets that support dumping, cpu_get_dump_info()
works as follows:
- target-s390x/arch_dump.c: (EM_S390, ELFCLASS64) only
- target-ppc/arch_dump.c (EM_PPC64, ELFCLASS64) only
- target-i386/arch_dump.c: sets (EM_X86_64, ELFCLASS64) vs. (EM_386,
ELFCLASS32) keying off the same Long Mode Active flag.
Hence no observable change.
Approximately-suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qapi/qmp-registry.c')
0 files changed, 0 insertions, 0 deletions