contrib/elf2dmp: use GLib in ELF processing

Replace POSIX mmap with GLib g_mapped_file_new in ELF processing module
to make elf2dmp cross-platform.

Signed-off-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-Id: <20181220012441.13694-3-viktor.prutyanov@phystech.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Viktor Prutyanov 2018-12-20 04:24:37 +03:00 committed by Paolo Bonzini
parent e53f3466e3
commit bd4d0da7db
2 changed files with 9 additions and 20 deletions

View file

@ -33,7 +33,7 @@ typedef struct QEMUCPUState {
int is_system(QEMUCPUState *s);
typedef struct QEMU_Elf {
int fd;
GMappedFile *gmf;
size_t size;
void *map;
QEMUCPUState **state;