projects
/
qemu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix elf loader range checking
[qemu]
/
elf.h
diff --git
a/elf.h
b/elf.h
index
e6ccfeb
..
182cad9
100644
(file)
--- a/
elf.h
+++ b/
elf.h
@@
-119,6
+119,8
@@
typedef int64_t Elf64_Sxword;
*/
#define EM_S390_OLD 0xA390
*/
#define EM_S390_OLD 0xA390
+#define EM_XILINX_MICROBLAZE 0xBAAB
+
/* This is the info that is needed to parse the dynamic section of the file */
#define DT_NULL 0
#define DT_NEEDED 1
/* This is the info that is needed to parse the dynamic section of the file */
#define DT_NULL 0
#define DT_NEEDED 1
@@
-1045,7
+1047,7
@@
typedef struct elf64_phdr {
#define SHN_COMMON 0xfff2
#define SHN_HIRESERVE 0xffff
#define SHN_MIPS_ACCOMON 0xff00
#define SHN_COMMON 0xfff2
#define SHN_HIRESERVE 0xffff
#define SHN_MIPS_ACCOMON 0xff00
-
+
typedef struct elf32_shdr {
Elf32_Word sh_name;
Elf32_Word sh_type;
typedef struct elf32_shdr {
Elf32_Word sh_name;
Elf32_Word sh_type;
@@
-1123,6
+1125,7
@@
typedef struct elf64_note {
Elf64_Word n_type; /* Content type */
} Elf64_Nhdr;
Elf64_Word n_type; /* Content type */
} Elf64_Nhdr;
+#ifdef ELF_CLASS
#if ELF_CLASS == ELFCLASS32
#define elfhdr elf32_hdr
#if ELF_CLASS == ELFCLASS32
#define elfhdr elf32_hdr
@@
-1130,6
+1133,7
@@
typedef struct elf64_note {
#define elf_note elf32_note
#define elf_shdr elf32_shdr
#define elf_sym elf32_sym
#define elf_note elf32_note
#define elf_shdr elf32_shdr
#define elf_sym elf32_sym
+#define elf_addr_t Elf32_Off
#ifdef ELF_USES_RELOCA
# define ELF_RELOC Elf32_Rela
#ifdef ELF_USES_RELOCA
# define ELF_RELOC Elf32_Rela
@@
-1144,6
+1148,7
@@
typedef struct elf64_note {
#define elf_note elf64_note
#define elf_shdr elf64_shdr
#define elf_sym elf64_sym
#define elf_note elf64_note
#define elf_shdr elf64_shdr
#define elf_sym elf64_sym
+#define elf_addr_t Elf64_Off
#ifdef ELF_USES_RELOCA
# define ELF_RELOC Elf64_Rela
#ifdef ELF_USES_RELOCA
# define ELF_RELOC Elf64_Rela
@@
-1163,5
+1168,7
@@
typedef struct elf64_note {
# endif
#endif
# endif
#endif
+#endif /* ELF_CLASS */
+
#endif /* _QEMU_ELF_H */
#endif /* _QEMU_ELF_H */