ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

elf-powerpc.h
Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1996-1997 John D. Polstra.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  *
00014  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
00015  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00016  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00017  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
00018  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00019  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00020  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00021  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00022  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00023  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00024  * SUCH DAMAGE.
00025  *
00026  * $FreeBSD: src/sys/powerpc/include/elf.h,v 1.16 2004/08/02 19:12:17 dfr Exp $
00027  */
00028 
00029 #ifndef _MACHINE_ELF_H_
00030 #define _MACHINE_ELF_H_ 1
00031 
00032 /*
00033  * ELF definitions for the powerpc architecture.
00034  */
00035 
00036 #ifdef _REACTOS_ELF_MACHINE_IS_TARGET
00037 
00038 #ifndef __ELF_WORD_SIZE
00039 #define __ELF_WORD_SIZE 32  /* Used by <elf/generic.h> */
00040 #endif
00041 
00042 #include <elf/generic.h>
00043 
00044 #define ELF_ARCH    EM_386
00045 
00046 #define ELF_MACHINE_OK(x) ((x) == EM_386 || (x) == EM_486)
00047 
00048 /*
00049  * Auxiliary vector entries for passing information to the interpreter.
00050  *
00051  * The powerpc supplement to the SVR4 ABI specification names this "auxv_t",
00052  * but POSIX lays claim to all symbols ending with "_t".
00053  */
00054 
00055 typedef struct {    /* Auxiliary vector entry on initial stack */
00056     int a_type;         /* Entry type. */
00057     union {
00058         long    a_val;      /* Integer value. */
00059         void    *a_ptr;     /* Address. */
00060         void    (*a_fcn)(void); /* Function pointer (not used). */
00061     } a_un;
00062 } Elf32_Auxinfo;
00063 
00064 #if __ELF_WORD_SIZE == 64
00065 /* Fake for amd64 loader support */
00066 typedef struct {
00067     int fake;
00068 } Elf64_Auxinfo;
00069 #endif
00070 
00071 __ElfType(Auxinfo);
00072 
00073 /* Values for a_type. */
00074 #define AT_NULL     0   /* Terminates the vector. */
00075 #define AT_IGNORE   1   /* Ignored entry. */
00076 #define AT_EXECFD   2   /* File descriptor of program to load. */
00077 #define AT_PHDR     3   /* Program header of program already loaded. */
00078 #define AT_PHENT    4   /* Size of each program header entry. */
00079 #define AT_PHNUM    5   /* Number of program header entries. */
00080 #define AT_PAGESZ   6   /* Page size in bytes. */
00081 #define AT_BASE     7   /* Interpreter's base address. */
00082 #define AT_FLAGS    8   /* Flags (unused for powerpc). */
00083 #define AT_ENTRY    9   /* Where interpreter should transfer control. */
00084 
00085 /*
00086  * The following non-standard values are used for passing information
00087  * from John Polstra's testbed program to the dynamic linker.  These
00088  * are expected to go away soon.
00089  *
00090  * Unfortunately, these overlap the Linux non-standard values, so they
00091  * must not be used in the same context.
00092  */
00093 #define AT_BRK      10  /* Starting point for sbrk and brk. */
00094 #define AT_DEBUG    11  /* Debugging level. */
00095 
00096 /*
00097  * The following non-standard values are used in Linux ELF binaries.
00098  */
00099 #define AT_NOTELF   10  /* Program is not ELF ?? */
00100 #define AT_UID      11  /* Real uid. */
00101 #define AT_EUID     12  /* Effective uid. */
00102 #define AT_GID      13  /* Real gid. */
00103 #define AT_EGID     14  /* Effective gid. */
00104 
00105 #define AT_COUNT    15  /* Count of defined aux entry types. */
00106 
00107 /* Define "machine" characteristics */
00108 #define ELF_TARG_CLASS  ELFCLASS32
00109 #define ELF_TARG_DATA   ELFDATA2LSB
00110 #define ELF_TARG_MACH   EM_386
00111 #define ELF_TARG_VER    1
00112 
00113 #endif /* _REACTOS_ELF_MACHINE_IS_TARGET */
00114 
00115 /*
00116  * Relocation types.
00117  */
00118 
00119 #define R_PPC_NONE            0
00120 #define R_PPC_ADDR32          1
00121 #define R_PPC_ADDR24          2
00122 #define R_PPC_ADDR16          3
00123 #define R_PPC_ADDR16_LO       4
00124 #define R_PPC_ADDR16_HI       5
00125 #define R_PPC_ADDR16_HA       6
00126 #define R_PPC_ADDR14          7
00127 #define R_PPC_ADDR14_BRTAKEN  8
00128 #define R_PPC_ADDR14_BRNTAKEN 9
00129 #define R_PPC_REL24           10
00130 #define R_PPC_REL14           11
00131 #define R_PPC_REL14_BRTAKEN   12
00132 #define R_PPC_REL14_BRNTAKEN  13
00133 #define R_PPC_GOT16           14
00134 #define R_PPC_GOT16_LO        15
00135 #define R_PPC_GOT16_HI        16
00136 #define R_PPC_GOT16_HA        17
00137 #define R_PPC_PLTREL24        18
00138 #define R_PPC_COPY            19
00139 #define R_PPC_GLOB_DAT        20
00140 #define R_PPC_JMP_SLOT        21
00141 #define R_PPC_RELATIVE        22
00142 #define R_PPC_LOCAL24PC       23
00143 #define R_PPC_UADDR32         24
00144 #define R_PPC_UADDR16         25
00145 #define R_PPC_REL32           26
00146 #define R_PPC_PLT32           27
00147 #define R_PPC_PLTREL32        28
00148 #define R_PPC_PLT16_LO        29
00149 #define R_PPC_PLT16_HI        30
00150 #define R_PPC_PLT16_HA        31
00151 #define R_PPC_SDAREL16        32
00152 #define R_PPC_SECTOFF         33
00153 #define R_PPC_SECTOFF_LO      34
00154 #define R_PPC_SECTOFF_HI      35
00155 #define R_PPC_SECTOFF_HA      36
00156 #define R_PPC_COUNT       37
00157 
00158 #endif /* !_MACHINE_ELF_H_ */

Generated on Sat May 26 2012 04:31:54 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.