syself.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2001, Sun Microsystems, Inc
00003  *
00004  * See the file "LICENSE.TERMS" for information on usage and
00005  * redistribution of this file, and for a DISCLAIMER OF ALL
00006  * WARRANTIES.
00007  *
00008  */
00009 
00010 /*==============================================================================
00011  * File:       syself.h
00012  * OVERVIEW:   This file contains the various system includes and the like
00013  *             needed to load elf binary files.
00014  *============================================================================*/
00015 
00016 /*
00017  * $Revision: 1.4 $
00018  * 11 May 01 - Nathan: Initial version
00019  */
00020 
00021 #ifndef __SYSELF_H_
00022 #define __SYSELF_H_
00023 
00024 #include "config.h"
00025 
00026 // ELF Support
00027 #ifdef HAVE_ELF_H
00028 #include <elf.h>
00029 #endif
00030 #ifdef HAVE_LIBELF_LIBELF_H
00031 #include <libelf/libelf.h> 
00032 #endif
00033 #ifdef HAVE_LIBELF_H
00034 #include <libelf.h>
00035 #endif
00036 #ifdef HAVE_SYS_ELF_SPARC_H
00037 #include <sys/elf_SPARC.h>
00038 #endif
00039 #ifdef HAVE_LINK_H
00040 #include <link.h>
00041 #endif
00042 #ifdef HAVE_SYS_LINK_H
00043 #include <sys/link.h>
00044 #endif
00045 #ifdef HAVE_SYS_AUXV_H
00046 #include <sys/auxv.h>
00047 #endif
00048 #ifndef HAVE_ELF32_VERSYM
00049 typedef Elf32_Half Elf32_Versym;
00050 #endif
00051 
00052 /* Lots of weirdness to deal with slightly different symbols between systems */
00053 #ifndef AT_SUN_EXECNAME
00054 #define AT_SUN_EXECNAME 2014
00055 #endif
00056 
00057 #ifndef EM_PARISC
00058 #ifdef EM_PA_RISC
00059 #define EM_PARISC EM_PA_RISC
00060 #endif
00061 #endif
00062 
00063 /* Use different symbols here because (lord help me) solaris defines
00064  * AT_UID and AT_GID to be something quite different. These aren't
00065  * (afaik) linux specific though
00066  */
00067 #define AT_LNX_UID          11              /* Real uid */
00068 #define AT_LNX_EUID         12              /* Effective uid */
00069 #define AT_LNX_GID          13              /* Real gid */
00070 #define AT_LNX_EGID         14              /* Effective gid */
00071 
00072 #ifndef AT_SUN_UID
00073 #define AT_SUN_UID    2000              /* As above, but for solaris... */
00074 #define AT_SUN_RUID   2001
00075 #define AT_SUN_GID    2002
00076 #define AT_SUN_RGID   2003
00077 #endif
00078 
00079 #endif /* !__SYSELF_H_ */

Generated on Tue Sep 19 21:18:34 2006 for Boomerang by  doxygen 1.4.6