Ignore:
Timestamp:
Feb 26, 2000, 1:46:31 AM (26 years ago)
Author:
bird
Message:

More elf definitions and declarations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/include/elf.h

    r2826 r2899  
    1 /* $Id: elf.h,v 1.4 2000-02-18 20:52:35 bird Exp $
     1/* $Id: elf.h,v 1.5 2000-02-26 00:46:30 bird Exp $
    22 *
    33 * ELF stuff.
    44 *
    5  * Copyright (c) 1999 knut st. osmundsen
     5 * Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
     
    242242 * ELF Program Header
    243243 */
    244 typedef struct
    245 {
    246     Elf32_Word      p_type;
    247     Elf32_Off       p_offset;
    248     Elf32_Addr      p_vaddr;
    249     Elf32_Addr      p_paddr;
    250     Elf32_Word      p_filesz;
    251     Elf32_Word      p_memsz;
    252     Elf32_Word      p_flags;
    253     Elf32_Word      p_align;
     244typedef struct                          /* 0x20 */
     245{
     246    Elf32_Word      p_type;             /* 0x00  Tells what this header describes or how to interpret it. */
     247    Elf32_Off       p_offset;           /* 0x04  Offset of the first byte of this segment. */
     248    Elf32_Addr      p_vaddr;            /* 0x08  Virtual address of the segment. */
     249    Elf32_Addr      p_paddr;            /* 0x0c  Physical address. Usually ignorable. */
     250    Elf32_Word      p_filesz;           /* 0x10  Count of bytes in the file image of this segment. Zero allowed. */
     251    Elf32_Word      p_memsz;            /* 0x14  Count of bytes in  the memory image of this segment. Zero allowed. */
     252    Elf32_Word      p_flags;            /* 0x18  Flags relevant to the segement. */
     253    Elf32_Word      p_align;            /* 0x1c  Alignment. 0 and 1 means no alignment. */
    254254} Elf32_Phdr;
     255
     256/* p_type - segment types */
     257#define PT_NULL         0               /* Unused header. */
     258#define PT_LOAD         1               /* Loadable segment. p_filesz, p_memsz and p_vaddr applies. */
     259#define PT_DYNAMIC      2               /* Dynamic linking information. */
     260#define PT_INTERP       3               /* Interpreter path. */
     261#define PT_NOTE         4               /* Auxiliary information. */
     262#define PT_SHLIB        5               /* Reserved. */
     263#define PT_PHDR         6               /* This header specifies the location and size of the program header table in file and memory. */
     264#define PT_LOPROC       0x70000000      /* Reserved processor-specific semantics range start. */
     265#define PT_HIPROC       0x7fffffff      /* Reserved processor-specific semantics range end (included). */
     266
     267/* p_flags - permission flags */
     268#define PF_X            1               /* Executable */
     269#define PF_W            2               /* Writeable */
     270#define PF_R            4               /* Readable */
     271
     272
     273/*
     274 * Dynamic Structure
     275 */
     276typedef struct                          /* 0x08 */
     277{
     278    Elf32_Sword     d_tag;              /* 0x00 Tag type. */
     279    union
     280    {
     281        Elf32_Word  d_val;              /* 0x04 Value, interpreted according to the tag type. */
     282        Elf32_Addr  d_ptr;              /* 0x04 Virtual address, interpreted according to the tag type. */
     283    } d_un;
     284} Elf32_Dyn;
     285
     286/* d_tag - tag types */                 /* d_un  exe so: '-' is ignored; '+' is mandatory; '*' is optional. */
     287#define DT_NULL         0               /*   -    -   -   Marks the end of the dynamic array. */
     288#define DT_NEEDED       1               /* d_val  *   *   This element holds the string table offset of a
     289                                                          null-terminated  string, giving the name of a needed
     290                                                          library. The offset is an index into the table
     291                                                          recoreded in the DT_STRTAB entry. */
     292#define DT_PLTRELSZ     2               /* d_val  *   *   This element holds the total size, in bytes, of the
     293                                                          relocation entries associated with the procedure
     294                                                          linkage table. If an entry of type DT_JMPREL is
     295                                                          present, a DT_PLTRELSZ must accompany it. */
     296#define DT_PLTGOT       3               /* d_ptr  *   *    */
     297#define DT_HASH         4               /* d_ptr  +   +    */
     298#define DT_STRTAB       5               /* d_ptr  +   +   This element holds the address of the string table.
     299                                                          Symbol names, library names, and other strings reside
     300                                                          in this table. */
     301#define DT_SYMTAB       6               /* d_ptr  +   +    */
     302#define DT_RELA         7               /* d_ptr  +   *    */
     303#define DT_RELASZ       8               /* d_val  +   *    */
     304#define DT_RELAENT      9               /* d_val  +   *    */
     305#define DT_STRSZ        10              /* d_val  +   +    */
     306#define DT_SYMENT       11              /* d_val  +   +    */
     307#define DT_INIT         12              /* d_ptr  *   *   This element holds the address of the initialization function. */
     308#define DT_FINI         13              /* d_ptr  *   *   This element holds the address of the termination function. */
     309#define DT_SONAME       14              /* d_val  -   *   This element holds the string table offset of a
     310                                                          null-terminated string, giving the name of the shared
     311                                                          object. The offset is an index into the table recorded
     312                                                          in the DT_STRTAB entry. */
     313#define DT_RPATH        15              /* d_val  +   +   This element holds the string table offset of a null-terminated
     314                                                          search library search path string. The offset is an index int
     315                                                          the table recorded in the DT_STRTAB entry. */
     316#define DT_SYMBOLIC     16              /*   -    -   *   This element's presence in a shared object library alters the
     317                                                          dynamic linker's symbol resolution algorithm for references
     318                                                          within the library. Instead of starting a symbol search with
     319                                                          the executable file, the dynamic linker starts from the shared
     320                                                          object file itself. If the shared object fails to supply the
     321                                                          referenced symbol, the dynamic linker then searches the
     322                                                          executable file and other shared objects as usual. */
     323#define DT_REL          17              /* d_ptr  +   *    */
     324#define DT_RELSZ        18              /* d_val  +   *    */
     325#define DT_RELENT       19              /* d_val  +   *    */
     326#define DT_PLTREL       20              /* d_val  *   *    */
     327#define DT_DEBUG        21              /* d_ptr  *   -    */
     328#define DT_TEXTREL      22              /*   -    *   *    */
     329#define DT_JMPREL       23              /* d_ptr  *   *    */
     330#define DT_LOPROC       0x70000000      /* Reserved processor-specific semantics range start. */
     331#define DT_HIPROC       0x7fffffff      /* Reserved processor-specific semantics range end (included). */
    255332
    256333#pragma pack()
Note: See TracChangeset for help on using the changeset viewer.