Phoenix
Object-oriented orthogonally persistent operating system
sys_elf.h
00001 /* sys_elf.h.  Generated automatically by configure. */
00002 /*
00003 sys_elf.h.in - configure template for private "switch" file.
00004 Copyright (C) 1998 - 2001 Michael Riepe
00005 
00006 This library is free software; you can redistribute it and/or
00007 modify it under the terms of the GNU Library General Public
00008 License as published by the Free Software Foundation; either
00009 version 2 of the License, or (at your option) any later version.
00010 
00011 This library is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 Library General Public License for more details.
00015 
00016 You should have received a copy of the GNU Library General Public
00017 License along with this library; if not, write to the Free Software
00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
00019 */
00020 
00021 /* @(#) $Id: sys_elf.h 172 2010-12-13 07:54:26Z vagran $ */
00022 
00023 /*
00024  * DO NOT USE THIS IN APPLICATIONS - #include <libelf.h> INSTEAD!
00025  */
00026 
00027 /* Define to `<elf.h>' or `<sys/elf.h>' if one of them is present */
00028 #define __LIBELF_HEADER_ELF_H <elf.h>
00029 
00030 /* Define if Elf32_Dyn is declared in <link.h> */
00031 /* #undef __LIBELF_NEED_LINK_H */
00032 
00033 /* Define if Elf32_Dyn is declared in <sys/link.h> */
00034 /* #undef __LIBELF_NEED_SYS_LINK_H */
00035 
00036 /* Define if you want 64-bit support (and your system supports it) */
00037 #define __LIBELF64 1
00038 
00039 /* Define if you want 64-bit support, and are running IRIX */
00040 /* #undef __LIBELF64_IRIX */
00041 
00042 /* Define if you want 64-bit support, and are running Linux */
00043 /* #undef __LIBELF64_LINUX */
00044 
00045 /* Define if you want symbol versioning (and your system supports it) */
00046 #define __LIBELF_SYMBOL_VERSIONS 1
00047 
00048 /* Define to a 64-bit signed integer type if one exists */
00049 #define __libelf_i64_t i64
00050 
00051 /* Define to a 64-bit unsigned integer type if one exists */
00052 #define __libelf_u64_t u64
00053 
00054 /* Define to a 32-bit signed integer type if one exists */
00055 #define __libelf_i32_t i32
00056 
00057 /* Define to a 32-bit unsigned integer type if one exists */
00058 #define __libelf_u32_t u32
00059 
00060 /* Define to a 16-bit signed integer type if one exists */
00061 #define __libelf_i16_t i16
00062 
00063 /* Define to a 16-bit unsigned integer type if one exists */
00064 #define __libelf_u16_t u16
00065 
00066 /*
00067  * Ok, now get the correct instance of elf.h...
00068  */
00069 #ifdef __LIBELF_HEADER_ELF_H
00070 # include __LIBELF_HEADER_ELF_H
00071 #else /* __LIBELF_HEADER_ELF_H */
00072 # if __LIBELF_INTERNAL__
00073 #  include <elf_repl.h>
00074 # else /* __LIBELF_INTERNAL__ */
00075 #  include <libelf/elf_repl.h>
00076 # endif /* __LIBELF_INTERNAL__ */
00077 #endif /* __LIBELF_HEADER_ELF_H */
00078 
00079 /*
00080  * On some systems, <elf.h> is severely broken.  Try to fix it.
00081  */
00082 #ifdef __LIBELF_HEADER_ELF_H
00083 
00084 # ifndef ELF32_FSZ_ADDR
00085 #  define ELF32_FSZ_ADDR    4
00086 #  define ELF32_FSZ_HALF    2
00087 #  define ELF32_FSZ_OFF     4
00088 #  define ELF32_FSZ_SWORD   4
00089 #  define ELF32_FSZ_WORD    4
00090 # endif /* ELF32_FSZ_ADDR */
00091 
00092 # ifndef STN_UNDEF
00093 #  define STN_UNDEF 0
00094 # endif /* STN_UNDEF */
00095 
00096 # if __LIBELF64
00097 
00098 #  ifndef ELF64_FSZ_ADDR
00099 #   define ELF64_FSZ_ADDR   8
00100 #   define ELF64_FSZ_HALF   2
00101 #   define ELF64_FSZ_OFF    8
00102 #   define ELF64_FSZ_SWORD  4
00103 #   define ELF64_FSZ_WORD   4
00104 #   define ELF64_FSZ_SXWORD 8
00105 #   define ELF64_FSZ_XWORD  8
00106 #  endif /* ELF64_FSZ_ADDR */
00107 
00108 #  ifndef ELF64_ST_BIND
00109 #   define ELF64_ST_BIND(i) ((i)>>4)
00110 #   define ELF64_ST_TYPE(i) ((i)&0xf)
00111 #   define ELF64_ST_INFO(b,t)   (((b)<<4)+((t)&0xf))
00112 #  endif /* ELF64_ST_BIND */
00113 
00114 #  ifndef ELF64_R_SYM
00115 #   define ELF64_R_SYM(i)   ((Elf64_Xword)(i)>>32)
00116 #   define ELF64_R_TYPE(i)  ((i)&0xffffffffL)
00117 #   define ELF64_R_INFO(s,t)    (((Elf64_Xword)(s)<<32)+((t)&0xffffffffL))
00118 #  endif /* ELF64_R_SYM */
00119 
00120 #  if __LIBELF64_LINUX
00121 typedef __libelf_u64_t  Elf64_Addr;
00122 typedef __libelf_u16_t  Elf64_Half;
00123 typedef __libelf_u64_t  Elf64_Off;
00124 typedef __libelf_i32_t  Elf64_Sword;
00125 typedef __libelf_u32_t  Elf64_Word;
00126 typedef __libelf_i64_t  Elf64_Sxword;
00127 typedef __libelf_u64_t  Elf64_Xword;
00128 #  endif /* __LIBELF64_LINUX */
00129 
00130 # endif /* __LIBELF64 */
00131 #endif /* __LIBELF_HEADER_ELF_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines