X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=elf.h;h=f8dea7c7c333abaf4560f8009a9da72f3256ed2b;hb=759b334a9739814df2883aa4c41b1c0f5670e90a;hp=0dc82e7ca467b6bed1a264f15d2c9e1425ef6eeb;hpb=6af0bf9c7c3ab9ddbf74a3bf34e067761eb43c3d;p=qemu diff --git a/elf.h b/elf.h index 0dc82e7..f8dea7c 100644 --- a/elf.h +++ b/elf.h @@ -119,6 +119,8 @@ typedef int64_t Elf64_Sxword; */ #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 @@ -227,6 +229,7 @@ typedef struct { #define ELF64_R_SYM(i) ((i) >> 32) #define ELF64_R_TYPE(i) ((i) & 0xffffffff) +#define ELF64_R_TYPE_DATA(i) (((ELF64_R_TYPE(i) >> 8) ^ 0x00800000) - 0x00800000) #define R_386_NONE 0 #define R_386_32 1 @@ -326,6 +329,10 @@ typedef struct { #define R_SPARC_10 30 #define R_SPARC_11 31 #define R_SPARC_64 32 +#define R_SPARC_OLO10 33 +#define R_SPARC_HH22 34 +#define R_SPARC_HM10 35 +#define R_SPARC_LM22 36 #define R_SPARC_WDISP16 40 #define R_SPARC_WDISP19 41 #define R_SPARC_7 43 @@ -500,6 +507,8 @@ typedef struct { #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ #define R_ARM_GOT32 26 /* 32 bit GOT entry */ #define R_ARM_PLT32 27 /* 32 bit PLT address */ +#define R_ARM_CALL 28 +#define R_ARM_JUMP24 29 #define R_ARM_GNU_VTENTRY 100 #define R_ARM_GNU_VTINHERIT 101 #define R_ARM_THM_PC11 102 /* thumb unconditional branch */ @@ -1038,7 +1047,7 @@ typedef struct elf64_phdr { #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; @@ -1072,7 +1081,23 @@ typedef struct elf64_shdr { #define EI_CLASS 4 #define EI_DATA 5 #define EI_VERSION 6 -#define EI_PAD 7 +#define EI_OSABI 7 +#define EI_PAD 8 + +#define ELFOSABI_NONE 0 /* UNIX System V ABI */ +#define ELFOSABI_SYSV 0 /* Alias. */ +#define ELFOSABI_HPUX 1 /* HP-UX */ +#define ELFOSABI_NETBSD 2 /* NetBSD. */ +#define ELFOSABI_LINUX 3 /* Linux. */ +#define ELFOSABI_SOLARIS 6 /* Sun Solaris. */ +#define ELFOSABI_AIX 7 /* IBM AIX. */ +#define ELFOSABI_IRIX 8 /* SGI Irix. */ +#define ELFOSABI_FREEBSD 9 /* FreeBSD. */ +#define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */ +#define ELFOSABI_MODESTO 11 /* Novell Modesto. */ +#define ELFOSABI_OPENBSD 12 /* OpenBSD. */ +#define ELFOSABI_ARM 97 /* ARM */ +#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ #define ELFMAG0 0x7f /* EI_MAG */ #define ELFMAG1 'E' @@ -1099,6 +1124,7 @@ typedef struct elf64_shdr { #define NT_PRFPREG 2 #define NT_PRPSINFO 3 #define NT_TASKSTRUCT 4 +#define NT_AUXV 6 #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ @@ -1116,6 +1142,7 @@ typedef struct elf64_note { Elf64_Word n_type; /* Content type */ } Elf64_Nhdr; +#ifdef ELF_CLASS #if ELF_CLASS == ELFCLASS32 #define elfhdr elf32_hdr @@ -1123,6 +1150,7 @@ typedef struct elf64_note { #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 @@ -1137,6 +1165,7 @@ typedef struct elf64_note { #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 @@ -1156,5 +1185,7 @@ typedef struct elf64_note { # endif #endif +#endif /* ELF_CLASS */ + #endif /* _QEMU_ELF_H */