Home | History | Annotate | Download | only in libelf
      1 /* External ELF types.
      2    Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
      3    Contributed by Ulrich Drepper <drepper (at) redhat.com>, 1998.
      4 
      5    This program is free software; you can redistribute it and/or modify
      6    it under the terms of the GNU General Public License as published by
      7    the Free Software Foundation, version 2.
      8 
      9    This program is distributed in the hope that it will be useful,
     10    but WITHOUT ANY WARRANTY; without even the implied warranty of
     11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12    GNU General Public License for more details.
     13 
     14    You should have received a copy of the GNU General Public License
     15    along with this program; if not, write to the Free Software Foundation,
     16    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
     17 
     18 #ifndef _EXTTYPES_H
     19 #define	_EXTTYPES_H 1
     20 
     21 /* Integral types.  */
     22 typedef char Elf32_Ext_Addr[ELF32_FSZ_ADDR];
     23 typedef char Elf32_Ext_Off[ELF32_FSZ_OFF];
     24 typedef char Elf32_Ext_Half[ELF32_FSZ_HALF];
     25 typedef char Elf32_Ext_Sword[ELF32_FSZ_SWORD];
     26 typedef char Elf32_Ext_Word[ELF32_FSZ_WORD];
     27 typedef char Elf32_Ext_Sxword[ELF32_FSZ_SXWORD];
     28 typedef char Elf32_Ext_Xword[ELF32_FSZ_XWORD];
     29 
     30 typedef char Elf64_Ext_Addr[ELF64_FSZ_ADDR];
     31 typedef char Elf64_Ext_Off[ELF64_FSZ_OFF];
     32 typedef char Elf64_Ext_Half[ELF64_FSZ_HALF];
     33 typedef char Elf64_Ext_Sword[ELF64_FSZ_SWORD];
     34 typedef char Elf64_Ext_Word[ELF64_FSZ_WORD];
     35 typedef char Elf64_Ext_Sxword[ELF64_FSZ_SXWORD];
     36 typedef char Elf64_Ext_Xword[ELF64_FSZ_XWORD];
     37 
     38 
     39 /* Define the composed types.  */
     40 #define START(Bits, Name, EName) typedef struct {
     41 #define END(Bits, Name) } ElfW2(Bits, Name)
     42 #define TYPE_NAME(Type, Name) Type Name;
     43 #define TYPE_EXTRA(Text) Text
     44 #define TYPE_XLATE(Text)
     45 
     46 /* Get the abstract definitions. */
     47 #include "abstract.h"
     48 
     49 /* And define the types.  */
     50 Ehdr32 (Ext_);
     51 Phdr32 (Ext_);
     52 Shdr32 (Ext_);
     53 Sym32 (Ext_);
     54 Rel32 (Ext_);
     55 Rela32 (Ext_);
     56 Note32 (Ext_);
     57 Dyn32 (Ext_);
     58 Verdef32 (Ext_);
     59 Verdaux32 (Ext_);
     60 Verneed32 (Ext_);
     61 Vernaux32 (Ext_);
     62 Syminfo32 (Ext_);
     63 Move32 (Ext_);
     64 
     65 Ehdr64 (Ext_);
     66 Phdr64 (Ext_);
     67 Shdr64 (Ext_);
     68 Sym64 (Ext_);
     69 Rel64 (Ext_);
     70 Rela64 (Ext_);
     71 Note64 (Ext_);
     72 Dyn64 (Ext_);
     73 Verdef64 (Ext_);
     74 Verdaux64 (Ext_);
     75 Verneed64 (Ext_);
     76 Vernaux64 (Ext_);
     77 Syminfo64 (Ext_);
     78 Move64 (Ext_);
     79 
     80 #undef START
     81 #undef END
     82 #undef TYPE_NAME
     83 #undef TYPE_EXTRA
     84 #undef TYPE_XLATE
     85 
     86 #endif	/* exttypes.h */
     87