Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
ir_elf.h
Go to the documentation of this file.
00001 /* -*-Mode: c++;-*- (Tell emacs to use c++ mode) */
00002 #ifndef ir_elf_INCLUDED
00003 #define ir_elf_INCLUDED
00004 
00005 // typedefs used to instantiate templates that are based on the format of
00006 // an Elf object
00007 
00008 struct ELF64
00009 {
00010     typedef Elf64_Off   Elf_Off;
00011     typedef Elf64_Ehdr  Elf_Ehdr;
00012     typedef Elf64_Shdr  Elf_Shdr;
00013     typedef Elf64_Sym   Elf_Sym;
00014 
00015     unsigned char Elf_class () const { return ELFCLASS64; }
00016     unsigned char Elf_st_info (UINT bind, UINT type) const {
00017         return ELF64_ST_INFO (bind, type);
00018     }
00019 };
00020 
00021 
00022 struct ELF32
00023 {
00024     typedef Elf32_Off   Elf_Off;
00025     typedef Elf32_Ehdr  Elf_Ehdr;
00026     typedef Elf32_Shdr  Elf_Shdr;
00027     typedef Elf32_Sym   Elf_Sym;
00028 
00029     unsigned char Elf_class () const { return ELFCLASS32; }
00030     unsigned char Elf_st_info (UINT bind, UINT type) const {
00031         return ELF32_ST_INFO (bind, type);
00032     }
00033 };
00034 
00035 #if defined(__sgi) && defined(mips) 
00036 #define __ALWAYS_USE_64BIT_ELF__
00037 #endif
00038 
00039 #endif // ir_elf_INCLUDED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines