aboutsummaryrefslogtreecommitdiff
path: root/contrib/elf2dmp/qemu_elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/elf2dmp/qemu_elf.h')
-rw-r--r--contrib/elf2dmp/qemu_elf.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/elf2dmp/qemu_elf.h b/contrib/elf2dmp/qemu_elf.h
index d85d6558fa..adc50238b4 100644
--- a/contrib/elf2dmp/qemu_elf.h
+++ b/contrib/elf2dmp/qemu_elf.h
@@ -2,14 +2,12 @@
* Copyright (c) 2018 Virtuozzo International GmbH
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
- *
*/
-#ifndef QEMU_ELF_H
-#define QEMU_ELF_H
+#ifndef ELF2DMP_QEMU_ELF_H
+#define ELF2DMP_QEMU_ELF_H
-#include <stdint.h>
-#include <elf.h>
+#include "elf.h"
typedef struct QEMUCPUSegment {
uint32_t selector;
@@ -34,7 +32,9 @@ typedef struct QEMUCPUState {
int is_system(QEMUCPUState *s);
typedef struct QEMU_Elf {
- int fd;
+#ifndef CONFIG_LINUX
+ GMappedFile *gmf;
+#endif
size_t size;
void *map;
QEMUCPUState **state;
@@ -42,10 +42,10 @@ typedef struct QEMU_Elf {
int has_kernel_gs_base;
} QEMU_Elf;
-int QEMU_Elf_init(QEMU_Elf *qe, const char *filename);
+bool QEMU_Elf_init(QEMU_Elf *qe, const char *filename);
void QEMU_Elf_exit(QEMU_Elf *qe);
Elf64_Phdr *elf64_getphdr(void *map);
Elf64_Half elf_getphdrnum(void *map);
-#endif /* QEMU_ELF_H */
+#endif /* ELF2DMP_QEMU_ELF_H */