X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Felf.h;h=a9839df3f2bdc74bce5e0f89f275c26fd1bd098a;hb=6de5bf24004c8d9c9b070bb8f7418d1c45e5eb27;hp=ed238c37f462cc3c396b7c7117320d9b18f5e41d;hpb=a2cecab6df0cfc6206ed3de29abe5d17cd4017a0;p=oweals%2Fu-boot.git diff --git a/include/elf.h b/include/elf.h index ed238c37f4..a9839df3f2 100644 --- a/include/elf.h +++ b/include/elf.h @@ -41,15 +41,13 @@ #include #elif defined(__linux__) && defined(USE_HOSTCC) #include +#elif defined(__WIN32__) +#include +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; #endif -#ifdef __CYGWIN__ -#include -typedef unsigned long int uint32_t; -typedef unsigned short uint16_t; -typedef unsigned char uint8_t; -#endif /* __CYGWIN__ */ - /* * This version doesn't work for 64-bit ABIs - Erik. */ @@ -115,9 +113,9 @@ typedef uint16_t Elf32_Half; /* Unsigned medium integer */ /* e_ident */ #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ - (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ - (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ - (ehdr).e_ident[EI_MAG3] == ELFMAG3) + (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ + (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ + (ehdr).e_ident[EI_MAG3] == ELFMAG3) /* ELF Header */ typedef struct elfhdr{ @@ -417,7 +415,7 @@ typedef struct /* Extract relocation info - r_info */ #define ELF32_R_SYM(i) ((i) >> 8) #define ELF32_R_TYPE(i) ((unsigned char) (i)) -#define ELF32_R_INFO(s,t) (((s) << 8) + (unsigned char)(t)) +#define ELF32_R_INFO(s,t) (((s) << 8) + (unsigned char)(t)) /* Program Header */ typedef struct { @@ -531,7 +529,7 @@ unsigned long elf_hash(const unsigned char *name); /* Cygnus local bits below */ #define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag*/ #define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib - flag */ + flag */ /* PowerPC relocations defined by the ABIs */ #define R_PPC_NONE 0 @@ -606,4 +604,3 @@ unsigned long elf_hash(const unsigned char *name); #define R_PPC_TOC16 255 #endif /* _ELF_H */ -