X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Felf.h;h=29f276d3f029320bbab74d64a08432b185ef5588;hb=095728803eedfce850a2f85828f79500cb09979e;hp=ed238c37f462cc3c396b7c7117320d9b18f5e41d;hpb=a2cecab6df0cfc6206ed3de29abe5d17cd4017a0;p=pandora-u-boot.git diff --git a/include/elf.h b/include/elf.h index ed238c37f4..29f276d3f0 100644 --- a/include/elf.h +++ b/include/elf.h @@ -33,22 +33,7 @@ #ifndef _ELF_H #define _ELF_H -#if defined(__BEOS__) || \ - defined(__NetBSD__) || \ - defined(__FreeBSD__) || \ - defined(__sun__) || \ - defined(__APPLE__) -#include -#elif defined(__linux__) && defined(USE_HOSTCC) -#include -#endif - -#ifdef __CYGWIN__ -#include -typedef unsigned long int uint32_t; -typedef unsigned short uint16_t; -typedef unsigned char uint8_t; -#endif /* __CYGWIN__ */ +#include "compiler.h" /* * This version doesn't work for 64-bit ABIs - Erik. @@ -115,9 +100,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 +402,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 +516,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 +591,3 @@ unsigned long elf_hash(const unsigned char *name); #define R_PPC_TOC16 255 #endif /* _ELF_H */ -