VirtualBox

Changeset 62458 in vbox


Ignore:
Timestamp:
Jul 22, 2016 4:10:28 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109014
Message:

include/iprt: scm

Location:
trunk/include/iprt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crypto/digest.h

    r61891 r62458  
    6464     */
    6565    DECLCALLBACKMEMBER(void *, pfnNew)(void);
    66    
     66
    6767    /**
    6868     * Frees the digest data.
  • trunk/include/iprt/formats/elf-amd64.h

    r58636 r62458  
    2626
    2727#ifndef ___iprt_formats_elf_amd64_h
    28 #define ___iprt_formats_elf_amd64_h
     28#define ___iprt_formats_elf_amd64_h
    2929
    3030/*
     
    3939 * but POSIX lays claim to all symbols ending with "_t".
    4040 */
    41 typedef struct {        /* Auxiliary vector entry on initial stack */
    42         int     a_type;                 /* Entry type. */
    43         union {
    44                 int     a_val;          /* Integer value. */
    45         } a_un;
     41typedef struct {        /* Auxiliary vector entry on initial stack */
     42        int     a_type;                 /* Entry type. */
     43        union {
     44                int     a_val;          /* Integer value. */
     45        } a_un;
    4646} Elf32_Auxinfo;
    4747
    4848
    49 typedef struct {        /* Auxiliary vector entry on initial stack */
    50         long    a_type;                 /* Entry type. */
    51         union {
    52                 long    a_val;          /* Integer value. */
    53                 void    *a_ptr;         /* Address. */
    54                 void    (*a_fcn)(void); /* Function pointer (not used). */
    55         } a_un;
     49typedef struct {        /* Auxiliary vector entry on initial stack */
     50        long    a_type;                 /* Entry type. */
     51        union {
     52                long    a_val;          /* Integer value. */
     53                void    *a_ptr;         /* Address. */
     54                void    (*a_fcn)(void); /* Function pointer (not used). */
     55        } a_un;
    5656} Elf64_Auxinfo;
    5757
     
    5959
    6060/* Values for a_type. */
    61 #define AT_NULL         0       /* Terminates the vector. */
    62 #define AT_IGNORE       1       /* Ignored entry. */
    63 #define AT_EXECFD       2       /* File descriptor of program to load. */
    64 #define AT_PHDR         3       /* Program header of program already loaded. */
    65 #define AT_PHENT        4       /* Size of each program header entry. */
    66 #define AT_PHNUM        5       /* Number of program header entries. */
    67 #define AT_PAGESZ       6       /* Page size in bytes. */
    68 #define AT_BASE         7       /* Interpreter's base address. */
    69 #define AT_FLAGS        8       /* Flags (unused for i386). */
    70 #define AT_ENTRY        9       /* Where interpreter should transfer control. */
     61#define AT_NULL         0       /* Terminates the vector. */
     62#define AT_IGNORE       1       /* Ignored entry. */
     63#define AT_EXECFD       2       /* File descriptor of program to load. */
     64#define AT_PHDR         3       /* Program header of program already loaded. */
     65#define AT_PHENT        4       /* Size of each program header entry. */
     66#define AT_PHNUM        5       /* Number of program header entries. */
     67#define AT_PAGESZ       6       /* Page size in bytes. */
     68#define AT_BASE         7       /* Interpreter's base address. */
     69#define AT_FLAGS        8       /* Flags (unused for i386). */
     70#define AT_ENTRY        9       /* Where interpreter should transfer control. */
    7171
    7272/*
     
    7878 * must not be used in the same context.
    7979 */
    80 #define AT_BRK          10      /* Starting point for sbrk and brk. */
    81 #define AT_DEBUG        11      /* Debugging level. */
     80#define AT_BRK          10      /* Starting point for sbrk and brk. */
     81#define AT_DEBUG        11      /* Debugging level. */
    8282
    8383/*
    8484 * The following non-standard values are used in Linux ELF binaries.
    8585 */
    86 #define AT_NOTELF       10      /* Program is not ELF ?? */
    87 #define AT_UID          11      /* Real uid. */
    88 #define AT_EUID         12      /* Effective uid. */
    89 #define AT_GID          13      /* Real gid. */
    90 #define AT_EGID         14      /* Effective gid. */
     86#define AT_NOTELF       10      /* Program is not ELF ?? */
     87#define AT_UID          11      /* Real uid. */
     88#define AT_EUID         12      /* Effective uid. */
     89#define AT_GID          13      /* Real gid. */
     90#define AT_EGID         14      /* Effective gid. */
    9191
    92 #define AT_COUNT        15      /* Count of defined aux entry types. */
     92#define AT_COUNT        15      /* Count of defined aux entry types. */
    9393
    9494#endif /* later */
     
    9898 */
    9999
    100 #define R_X86_64_NONE   0       /* No relocation. */
    101 #define R_X86_64_64     1       /* Add 64 bit symbol value. */
    102 #define R_X86_64_PC32   2       /* PC-relative 32 bit signed sym value. */
    103 #define R_X86_64_GOT32  3       /* PC-relative 32 bit GOT offset. */
    104 #define R_X86_64_PLT32  4       /* PC-relative 32 bit PLT offset. */
    105 #define R_X86_64_COPY   5       /* Copy data from shared object. */
    106 #define R_X86_64_GLOB_DAT 6     /* Set GOT entry to data address. */
    107 #define R_X86_64_JMP_SLOT 7     /* Set GOT entry to code address. */
    108 #define R_X86_64_RELATIVE 8     /* Add load address of shared object. */
    109 #define R_X86_64_GOTPCREL 9     /* Add 32 bit signed pcrel offset to GOT. */
    110 #define R_X86_64_32     10      /* Add 32 bit zero extended symbol value */
    111 #define R_X86_64_32S    11      /* Add 32 bit sign extended symbol value */
    112 #define R_X86_64_16     12      /* Add 16 bit zero extended symbol value */
    113 #define R_X86_64_PC16   13      /* Add 16 bit signed extended pc relative symbol value */
    114 #define R_X86_64_8      14      /* Add 8 bit zero extended symbol value */
    115 #define R_X86_64_PC8    15      /* Add 8 bit signed extended pc relative symbol value */
    116 #define R_X86_64_DTPMOD64 16    /* ID of module containing symbol */
    117 #define R_X86_64_DTPOFF64 17    /* Offset in TLS block */
    118 #define R_X86_64_TPOFF64 18     /* Offset in static TLS block */
    119 #define R_X86_64_TLSGD  19      /* PC relative offset to GD GOT entry */
    120 #define R_X86_64_TLSLD  20      /* PC relative offset to LD GOT entry */
    121 #define R_X86_64_DTPOFF32 21    /* Offset in TLS block */
    122 #define R_X86_64_GOTTPOFF 22    /* PC relative offset to IE GOT entry */
    123 #define R_X86_64_TPOFF32 23     /* Offset in static TLS block */
     100#define R_X86_64_NONE   0       /* No relocation. */
     101#define R_X86_64_64     1       /* Add 64 bit symbol value. */
     102#define R_X86_64_PC32   2       /* PC-relative 32 bit signed sym value. */
     103#define R_X86_64_GOT32  3       /* PC-relative 32 bit GOT offset. */
     104#define R_X86_64_PLT32  4       /* PC-relative 32 bit PLT offset. */
     105#define R_X86_64_COPY   5       /* Copy data from shared object. */
     106#define R_X86_64_GLOB_DAT 6     /* Set GOT entry to data address. */
     107#define R_X86_64_JMP_SLOT 7     /* Set GOT entry to code address. */
     108#define R_X86_64_RELATIVE 8     /* Add load address of shared object. */
     109#define R_X86_64_GOTPCREL 9     /* Add 32 bit signed pcrel offset to GOT. */
     110#define R_X86_64_32     10      /* Add 32 bit zero extended symbol value */
     111#define R_X86_64_32S    11      /* Add 32 bit sign extended symbol value */
     112#define R_X86_64_16     12      /* Add 16 bit zero extended symbol value */
     113#define R_X86_64_PC16   13      /* Add 16 bit signed extended pc relative symbol value */
     114#define R_X86_64_8      14      /* Add 8 bit zero extended symbol value */
     115#define R_X86_64_PC8    15      /* Add 8 bit signed extended pc relative symbol value */
     116#define R_X86_64_DTPMOD64 16    /* ID of module containing symbol */
     117#define R_X86_64_DTPOFF64 17    /* Offset in TLS block */
     118#define R_X86_64_TPOFF64 18     /* Offset in static TLS block */
     119#define R_X86_64_TLSGD  19      /* PC relative offset to GD GOT entry */
     120#define R_X86_64_TLSLD  20      /* PC relative offset to LD GOT entry */
     121#define R_X86_64_DTPOFF32 21    /* Offset in TLS block */
     122#define R_X86_64_GOTTPOFF 22    /* PC relative offset to IE GOT entry */
     123#define R_X86_64_TPOFF32 23     /* Offset in static TLS block */
    124124
    125 #define R_X86_64_COUNT  24      /* Count of defined relocation types. */
     125#define R_X86_64_COUNT  24      /* Count of defined relocation types. */
    126126
    127127#endif
  • trunk/include/iprt/formats/elf-common.h

    r58636 r62458  
    4444
    4545typedef struct {
    46         uint32_t        n_namesz;       /* Length of name. */
    47         uint32_t        n_descsz;       /* Length of descriptor. */
    48         uint32_t        n_type;         /* Type of this note. */
     46        uint32_t        n_namesz;       /* Length of name. */
     47        uint32_t        n_descsz;       /* Length of descriptor. */
     48        uint32_t        n_type;         /* Type of this note. */
    4949} Elf_Note;
    5050
    5151/* Indexes into the e_ident array.  Keep synced with
    5252   http://www.sco.com/developer/gabi/ch4.eheader.html */
    53 #define EI_MAG0         0       /* Magic number, byte 0. */
    54 #define EI_MAG1         1       /* Magic number, byte 1. */
    55 #define EI_MAG2         2       /* Magic number, byte 2. */
    56 #define EI_MAG3         3       /* Magic number, byte 3. */
    57 #define EI_CLASS        4       /* Class of machine. */
    58 #define EI_DATA         5       /* Data format. */
    59 #define EI_VERSION      6       /* ELF format version. */
    60 #define EI_OSABI        7       /* Operating system / ABI identification */
    61 #define EI_ABIVERSION   8       /* ABI version */
    62 #define OLD_EI_BRAND    8       /* Start of architecture identification. */
    63 #define EI_PAD          9       /* Start of padding (per SVR4 ABI). */
    64 #define EI_NIDENT       16      /* Size of e_ident array. */
     53#define EI_MAG0         0       /* Magic number, byte 0. */
     54#define EI_MAG1         1       /* Magic number, byte 1. */
     55#define EI_MAG2         2       /* Magic number, byte 2. */
     56#define EI_MAG3         3       /* Magic number, byte 3. */
     57#define EI_CLASS        4       /* Class of machine. */
     58#define EI_DATA         5       /* Data format. */
     59#define EI_VERSION      6       /* ELF format version. */
     60#define EI_OSABI        7       /* Operating system / ABI identification */
     61#define EI_ABIVERSION   8       /* ABI version */
     62#define OLD_EI_BRAND    8       /* Start of architecture identification. */
     63#define EI_PAD          9       /* Start of padding (per SVR4 ABI). */
     64#define EI_NIDENT       16      /* Size of e_ident array. */
    6565
    6666/* Values for the magic number bytes. */
    67 #define ELFMAG0         0x7f
    68 #define ELFMAG1         'E'
    69 #define ELFMAG2         'L'
    70 #define ELFMAG3         'F'
    71 #define ELFMAG          "\177ELF"       /* magic string */
    72 #define SELFMAG         4               /* magic string size */
     67#define ELFMAG0         0x7f
     68#define ELFMAG1         'E'
     69#define ELFMAG2         'L'
     70#define ELFMAG3         'F'
     71#define ELFMAG          "\177ELF"       /* magic string */
     72#define SELFMAG         4               /* magic string size */
    7373
    7474/* Values for e_ident[EI_VERSION] and e_version. */
    75 #define EV_NONE         0
    76 #define EV_CURRENT      1
     75#define EV_NONE         0
     76#define EV_CURRENT      1
    7777
    7878/* Values for e_ident[EI_CLASS]. */
    79 #define ELFCLASSNONE    0       /* Unknown class. */
    80 #define ELFCLASS32      1       /* 32-bit architecture. */
    81 #define ELFCLASS64      2       /* 64-bit architecture. */
     79#define ELFCLASSNONE    0       /* Unknown class. */
     80#define ELFCLASS32      1       /* 32-bit architecture. */
     81#define ELFCLASS64      2       /* 64-bit architecture. */
    8282
    8383/* Values for e_ident[EI_DATA]. */
    84 #define ELFDATANONE     0       /* Unknown data format. */
    85 #define ELFDATA2LSB     1       /* 2's complement little-endian. */
    86 #define ELFDATA2MSB     2       /* 2's complement big-endian. */
     84#define ELFDATANONE     0       /* Unknown data format. */
     85#define ELFDATA2LSB     1       /* 2's complement little-endian. */
     86#define ELFDATA2MSB     2       /* 2's complement big-endian. */
    8787
    8888/* Values for e_ident[EI_OSABI]. */
    89 #define ELFOSABI_SYSV           0       /* UNIX System V ABI */
    90 #define ELFOSABI_NONE           ELFOSABI_SYSV   /* symbol used in old spec */
    91 #define ELFOSABI_HPUX           1       /* HP-UX operating system */
    92 #define ELFOSABI_NETBSD         2       /* NetBSD */
    93 #define ELFOSABI_LINUX          3       /* GNU/Linux */
    94 #define ELFOSABI_HURD           4       /* GNU/Hurd */
    95 #define ELFOSABI_86OPEN         5       /* 86Open common IA32 ABI */
    96 #define ELFOSABI_SOLARIS        6       /* Solaris */
    97 #define ELFOSABI_MONTEREY       7       /* Monterey */
    98 #define ELFOSABI_IRIX           8       /* IRIX */
    99 #define ELFOSABI_FREEBSD        9       /* FreeBSD */
    100 #define ELFOSABI_TRU64          10      /* TRU64 UNIX */
    101 #define ELFOSABI_MODESTO        11      /* Novell Modesto */
    102 #define ELFOSABI_OPENBSD        12      /* OpenBSD */
    103 #define ELFOSABI_ARM            97      /* ARM */
    104 #define ELFOSABI_STANDALONE     255     /* Standalone (embedded) application */
     89#define ELFOSABI_SYSV           0       /* UNIX System V ABI */
     90#define ELFOSABI_NONE           ELFOSABI_SYSV   /* symbol used in old spec */
     91#define ELFOSABI_HPUX           1       /* HP-UX operating system */
     92#define ELFOSABI_NETBSD         2       /* NetBSD */
     93#define ELFOSABI_LINUX          3       /* GNU/Linux */
     94#define ELFOSABI_HURD           4       /* GNU/Hurd */
     95#define ELFOSABI_86OPEN         5       /* 86Open common IA32 ABI */
     96#define ELFOSABI_SOLARIS        6       /* Solaris */
     97#define ELFOSABI_MONTEREY       7       /* Monterey */
     98#define ELFOSABI_IRIX           8       /* IRIX */
     99#define ELFOSABI_FREEBSD        9       /* FreeBSD */
     100#define ELFOSABI_TRU64          10      /* TRU64 UNIX */
     101#define ELFOSABI_MODESTO        11      /* Novell Modesto */
     102#define ELFOSABI_OPENBSD        12      /* OpenBSD */
     103#define ELFOSABI_ARM            97      /* ARM */
     104#define ELFOSABI_STANDALONE     255     /* Standalone (embedded) application */
    105105
    106106/* e_ident */
    107 #define IS_ELF(ehdr)    ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
    108                         (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
    109                         (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
    110                         (ehdr).e_ident[EI_MAG3] == ELFMAG3)
     107#define IS_ELF(ehdr)    ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
     108                        (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
     109                        (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
     110                        (ehdr).e_ident[EI_MAG3] == ELFMAG3)
    111111
    112112/* Values for e_type. */
    113 #define ET_NONE         0       /* Unknown type. */
    114 #define ET_REL          1       /* Relocatable. */
    115 #define ET_EXEC         2       /* Executable. */
    116 #define ET_DYN          3       /* Shared object. */
    117 #define ET_CORE         4       /* Core file. */
     113#define ET_NONE         0       /* Unknown type. */
     114#define ET_REL          1       /* Relocatable. */
     115#define ET_EXEC         2       /* Executable. */
     116#define ET_DYN          3       /* Shared object. */
     117#define ET_CORE         4       /* Core file. */
    118118
    119119/* Values for e_machine. */
    120 #define EM_NONE         0       /* Unknown machine. */
    121 #define EM_M32          1       /* AT&T WE32100. */
    122 #define EM_SPARC        2       /* Sun SPARC. */
    123 #define EM_386          3       /* Intel i386. */
    124 #define EM_68K          4       /* Motorola 68000. */
    125 #define EM_88K          5       /* Motorola 88000. */
    126 #define EM_486          6       /* Intel i486. */
    127 #define EM_860          7       /* Intel i860. */
    128 #define EM_MIPS         8       /* MIPS R3000 Big-Endian only */
     120#define EM_NONE         0       /* Unknown machine. */
     121#define EM_M32          1       /* AT&T WE32100. */
     122#define EM_SPARC        2       /* Sun SPARC. */
     123#define EM_386          3       /* Intel i386. */
     124#define EM_68K          4       /* Motorola 68000. */
     125#define EM_88K          5       /* Motorola 88000. */
     126#define EM_486          6       /* Intel i486. */
     127#define EM_860          7       /* Intel i860. */
     128#define EM_MIPS         8       /* MIPS R3000 Big-Endian only */
    129129
    130130/* Extensions.  This list is not complete. */
    131 #define EM_S370         9       /* IBM System/370 */
    132 #define EM_MIPS_RS4_BE  10      /* MIPS R4000 Big-Endian */ /* Depreciated */
    133 #define EM_PARISC       15      /* HPPA */
    134 #define EM_SPARC32PLUS  18      /* SPARC v8plus */
    135 #define EM_PPC          20      /* PowerPC 32-bit */
    136 #define EM_PPC64        21      /* PowerPC 64-bit */
    137 #define EM_ARM          40      /* ARM */
    138 #define EM_SPARCV9      43      /* SPARC v9 64-bit */
    139 #define EM_IA_64        50      /* Intel IA-64 Processor */
    140 #define EM_X86_64       62      /* Advanced Micro Devices x86-64 */
     131#define EM_S370         9       /* IBM System/370 */
     132#define EM_MIPS_RS4_BE  10      /* MIPS R4000 Big-Endian */ /* Depreciated */
     133#define EM_PARISC       15      /* HPPA */
     134#define EM_SPARC32PLUS  18      /* SPARC v8plus */
     135#define EM_PPC          20      /* PowerPC 32-bit */
     136#define EM_PPC64        21      /* PowerPC 64-bit */
     137#define EM_ARM          40      /* ARM */
     138#define EM_SPARCV9      43      /* SPARC v9 64-bit */
     139#define EM_IA_64        50      /* Intel IA-64 Processor */
     140#define EM_X86_64       62      /* Advanced Micro Devices x86-64 */
    141141#define EM_AMD64    EM_X86_64   /* SunOS compatibility (added by Ramshankar) */
    142 #define EM_ALPHA        0x9026  /* Alpha (written in the absence of an ABI */
     142#define EM_ALPHA        0x9026  /* Alpha (written in the absence of an ABI */
    143143
    144144/* Special section indexes. */
    145 #define SHN_UNDEF            0          /* Undefined, missing, irrelevant. */
    146 #define SHN_LORESERVE   0xff00          /* First of reserved range. */
    147 #define SHN_LOPROC      0xff00          /* First processor-specific. */
    148 #define SHN_HIPROC      0xff1f          /* Last processor-specific. */
    149 #define SHN_ABS         0xfff1          /* Absolute values. */
    150 #define SHN_COMMON      0xfff2          /* Common data. */
    151 #define SHN_HIRESERVE   0xffff          /* Last of reserved range. */
     145#define SHN_UNDEF            0          /* Undefined, missing, irrelevant. */
     146#define SHN_LORESERVE   0xff00          /* First of reserved range. */
     147#define SHN_LOPROC      0xff00          /* First processor-specific. */
     148#define SHN_HIPROC      0xff1f          /* Last processor-specific. */
     149#define SHN_ABS         0xfff1          /* Absolute values. */
     150#define SHN_COMMON      0xfff2          /* Common data. */
     151#define SHN_HIRESERVE   0xffff          /* Last of reserved range. */
    152152
    153153/* sh_type */
    154 #define SHT_NULL        0               /* inactive */
    155 #define SHT_PROGBITS    1               /* program defined information */
    156 #define SHT_SYMTAB      2               /* symbol table section */
    157 #define SHT_STRTAB      3               /* string table section */
    158 #define SHT_RELA        4               /* relocation section with addends */
    159 #define SHT_HASH        5               /* symbol hash table section */
    160 #define SHT_DYNAMIC     6               /* dynamic section */
    161 #define SHT_NOTE        7               /* note section */
    162 #define SHT_NOBITS      8               /* no space section */
    163 #define SHT_REL         9               /* relocation section - no addends */
    164 #define SHT_SHLIB       10              /* reserved - purpose unknown */
    165 #define SHT_DYNSYM      11              /* dynamic symbol table section */
    166 #define SHT_NUM         12              /* number of section types */
    167 #define SHT_LOOS        0x60000000      /* First of OS specific semantics */
    168 #define SHT_HIOS        0x6fffffff      /* Last of OS specific semantics */
    169 #define SHT_LOPROC      0x70000000      /* reserved range for processor */
    170 #define SHT_HIPROC      0x7fffffff      /* specific section header types */
    171 #define SHT_LOUSER      0x80000000      /* reserved range for application */
    172 #define SHT_HIUSER      0xffffffff      /* specific indexes */
     154#define SHT_NULL        0               /* inactive */
     155#define SHT_PROGBITS    1               /* program defined information */
     156#define SHT_SYMTAB      2               /* symbol table section */
     157#define SHT_STRTAB      3               /* string table section */
     158#define SHT_RELA        4               /* relocation section with addends */
     159#define SHT_HASH        5               /* symbol hash table section */
     160#define SHT_DYNAMIC     6               /* dynamic section */
     161#define SHT_NOTE        7               /* note section */
     162#define SHT_NOBITS      8               /* no space section */
     163#define SHT_REL         9               /* relocation section - no addends */
     164#define SHT_SHLIB       10              /* reserved - purpose unknown */
     165#define SHT_DYNSYM      11              /* dynamic symbol table section */
     166#define SHT_NUM         12              /* number of section types */
     167#define SHT_LOOS        0x60000000      /* First of OS specific semantics */
     168#define SHT_HIOS        0x6fffffff      /* Last of OS specific semantics */
     169#define SHT_LOPROC      0x70000000      /* reserved range for processor */
     170#define SHT_HIPROC      0x7fffffff      /* specific section header types */
     171#define SHT_LOUSER      0x80000000      /* reserved range for application */
     172#define SHT_HIUSER      0xffffffff      /* specific indexes */
    173173
    174174/* Flags for sh_flags. */
    175 #define SHF_WRITE       0x1             /* Section contains writable data. */
    176 #define SHF_ALLOC       0x2             /* Section occupies memory. */
    177 #define SHF_EXECINSTR   0x4             /* Section contains instructions. */
    178 #define SHF_TLS         0x400           /* Section contains TLS data. */
    179 #define SHF_MASKPROC    0xf0000000      /* Reserved for processor-specific. */
     175#define SHF_WRITE       0x1             /* Section contains writable data. */
     176#define SHF_ALLOC       0x2             /* Section occupies memory. */
     177#define SHF_EXECINSTR   0x4             /* Section contains instructions. */
     178#define SHF_TLS         0x400           /* Section contains TLS data. */
     179#define SHF_MASKPROC    0xf0000000      /* Reserved for processor-specific. */
    180180
    181181/* Values for p_type. */
    182 #define PT_NULL         0       /* Unused entry. */
    183 #define PT_LOAD         1       /* Loadable segment. */
    184 #define PT_DYNAMIC      2       /* Dynamic linking information segment. */
    185 #define PT_INTERP       3       /* Pathname of interpreter. */
    186 #define PT_NOTE         4       /* Auxiliary information. */
    187 #define PT_SHLIB        5       /* Reserved (not used). */
    188 #define PT_PHDR         6       /* Location of program header itself. */
    189 #define PT_TLS          7       /* Thread local storage segment */
    190 
    191 #define PT_COUNT        8       /* Number of defined p_type values. */
    192 
    193 #define PT_LOOS         0x60000000      /* OS-specific */
    194 #define PT_HIOS         0x6fffffff      /* OS-specific */
    195 #define PT_LOPROC       0x70000000      /* First processor-specific type. */
    196 #define PT_HIPROC       0x7fffffff      /* Last processor-specific type. */
     182#define PT_NULL         0       /* Unused entry. */
     183#define PT_LOAD         1       /* Loadable segment. */
     184#define PT_DYNAMIC      2       /* Dynamic linking information segment. */
     185#define PT_INTERP       3       /* Pathname of interpreter. */
     186#define PT_NOTE         4       /* Auxiliary information. */
     187#define PT_SHLIB        5       /* Reserved (not used). */
     188#define PT_PHDR         6       /* Location of program header itself. */
     189#define PT_TLS          7       /* Thread local storage segment */
     190
     191#define PT_COUNT        8       /* Number of defined p_type values. */
     192
     193#define PT_LOOS         0x60000000      /* OS-specific */
     194#define PT_HIOS         0x6fffffff      /* OS-specific */
     195#define PT_LOPROC       0x70000000      /* First processor-specific type. */
     196#define PT_HIPROC       0x7fffffff      /* Last processor-specific type. */
    197197
    198198/* Values for p_flags. */
    199 #define PF_X            0x1     /* Executable. */
    200 #define PF_W            0x2     /* Writable. */
    201 #define PF_R            0x4     /* Readable. */
     199#define PF_X            0x1     /* Executable. */
     200#define PF_W            0x2     /* Writable. */
     201#define PF_R            0x4     /* Readable. */
    202202
    203203/* Values for d_tag. */
    204 #define DT_NULL         0       /* Terminating entry. */
    205 #define DT_NEEDED       1       /* String table offset of a needed shared
    206                                    library. */
    207 #define DT_PLTRELSZ     2       /* Total size in bytes of PLT relocations. */
    208 #define DT_PLTGOT       3       /* Processor-dependent address. */
    209 #define DT_HASH         4       /* Address of symbol hash table. */
    210 #define DT_STRTAB       5       /* Address of string table. */
    211 #define DT_SYMTAB       6       /* Address of symbol table. */
    212 #define DT_RELA         7       /* Address of ElfNN_Rela relocations. */
    213 #define DT_RELASZ       8       /* Total size of ElfNN_Rela relocations. */
    214 #define DT_RELAENT      9       /* Size of each ElfNN_Rela relocation entry. */
    215 #define DT_STRSZ        10      /* Size of string table. */
    216 #define DT_SYMENT       11      /* Size of each symbol table entry. */
    217 #define DT_INIT         12      /* Address of initialization function. */
    218 #define DT_FINI         13      /* Address of finalization function. */
    219 #define DT_SONAME       14      /* String table offset of shared object
    220                                    name. */
    221 #define DT_RPATH        15      /* String table offset of library path. [sup] */
    222 #define DT_SYMBOLIC     16      /* Indicates "symbolic" linking. [sup] */
    223 #define DT_REL          17      /* Address of ElfNN_Rel relocations. */
    224 #define DT_RELSZ        18      /* Total size of ElfNN_Rel relocations. */
    225 #define DT_RELENT       19      /* Size of each ElfNN_Rel relocation. */
    226 #define DT_PLTREL       20      /* Type of relocation used for PLT. */
    227 #define DT_DEBUG        21      /* Reserved (not used). */
    228 #define DT_TEXTREL      22      /* Indicates there may be relocations in
    229                                    non-writable segments. [sup] */
    230 #define DT_JMPREL       23      /* Address of PLT relocations. */
    231 #define DT_BIND_NOW     24      /* [sup] */
    232 #define DT_INIT_ARRAY   25      /* Address of the array of pointers to
    233                                    initialization functions */
    234 #define DT_FINI_ARRAY   26      /* Address of the array of pointers to
    235                                    termination functions */
    236 #define DT_INIT_ARRAYSZ 27      /* Size in bytes of the array of
    237                                    initialization functions. */
    238 #define DT_FINI_ARRAYSZ 28      /* Size in bytes of the array of
    239                                    terminationfunctions. */
    240 #define DT_RUNPATH      29      /* String table offset of a null-terminated
    241                                    library search path string. */
    242 #define DT_FLAGS        30      /* Object specific flag values. */
    243 #define DT_ENCODING     32      /* Values greater than or equal to DT_ENCODING
    244                                    and less than DT_LOOS follow the rules for
    245                                    the interpretation of the d_un union
    246                                    as follows: even == 'd_ptr', even == 'd_val'
    247                                    or none */
    248 #define DT_PREINIT_ARRAY 32     /* Address of the array of pointers to
    249                                    pre-initialization functions. */
    250 #define DT_PREINIT_ARRAYSZ 33   /* Size in bytes of the array of
    251                                    pre-initialization functions. */
    252 
    253 #define DT_COUNT        33      /* Number of defined d_tag values. */
    254 
    255 #define DT_LOOS         0x6000000d      /* First OS-specific */
    256 #define DT_HIOS         0x6fff0000      /* Last OS-specific */
    257 #define DT_LOPROC       0x70000000      /* First processor-specific type. */
    258 #define DT_HIPROC       0x7fffffff      /* Last processor-specific type. */
     204#define DT_NULL         0       /* Terminating entry. */
     205#define DT_NEEDED       1       /* String table offset of a needed shared
     206                                   library. */
     207#define DT_PLTRELSZ     2       /* Total size in bytes of PLT relocations. */
     208#define DT_PLTGOT       3       /* Processor-dependent address. */
     209#define DT_HASH         4       /* Address of symbol hash table. */
     210#define DT_STRTAB       5       /* Address of string table. */
     211#define DT_SYMTAB       6       /* Address of symbol table. */
     212#define DT_RELA         7       /* Address of ElfNN_Rela relocations. */
     213#define DT_RELASZ       8       /* Total size of ElfNN_Rela relocations. */
     214#define DT_RELAENT      9       /* Size of each ElfNN_Rela relocation entry. */
     215#define DT_STRSZ        10      /* Size of string table. */
     216#define DT_SYMENT       11      /* Size of each symbol table entry. */
     217#define DT_INIT         12      /* Address of initialization function. */
     218#define DT_FINI         13      /* Address of finalization function. */
     219#define DT_SONAME       14      /* String table offset of shared object
     220                                   name. */
     221#define DT_RPATH        15      /* String table offset of library path. [sup] */
     222#define DT_SYMBOLIC     16      /* Indicates "symbolic" linking. [sup] */
     223#define DT_REL          17      /* Address of ElfNN_Rel relocations. */
     224#define DT_RELSZ        18      /* Total size of ElfNN_Rel relocations. */
     225#define DT_RELENT       19      /* Size of each ElfNN_Rel relocation. */
     226#define DT_PLTREL       20      /* Type of relocation used for PLT. */
     227#define DT_DEBUG        21      /* Reserved (not used). */
     228#define DT_TEXTREL      22      /* Indicates there may be relocations in
     229                                   non-writable segments. [sup] */
     230#define DT_JMPREL       23      /* Address of PLT relocations. */
     231#define DT_BIND_NOW     24      /* [sup] */
     232#define DT_INIT_ARRAY   25      /* Address of the array of pointers to
     233                                   initialization functions */
     234#define DT_FINI_ARRAY   26      /* Address of the array of pointers to
     235                                   termination functions */
     236#define DT_INIT_ARRAYSZ 27      /* Size in bytes of the array of
     237                                   initialization functions. */
     238#define DT_FINI_ARRAYSZ 28      /* Size in bytes of the array of
     239                                   terminationfunctions. */
     240#define DT_RUNPATH      29      /* String table offset of a null-terminated
     241                                   library search path string. */
     242#define DT_FLAGS        30      /* Object specific flag values. */
     243#define DT_ENCODING     32      /* Values greater than or equal to DT_ENCODING
     244                                   and less than DT_LOOS follow the rules for
     245                                   the interpretation of the d_un union
     246                                   as follows: even == 'd_ptr', even == 'd_val'
     247                                   or none */
     248#define DT_PREINIT_ARRAY 32     /* Address of the array of pointers to
     249                                   pre-initialization functions. */
     250#define DT_PREINIT_ARRAYSZ 33   /* Size in bytes of the array of
     251                                   pre-initialization functions. */
     252
     253#define DT_COUNT        33      /* Number of defined d_tag values. */
     254
     255#define DT_LOOS         0x6000000d      /* First OS-specific */
     256#define DT_HIOS         0x6fff0000      /* Last OS-specific */
     257#define DT_LOPROC       0x70000000      /* First processor-specific type. */
     258#define DT_HIPROC       0x7fffffff      /* Last processor-specific type. */
    259259
    260260/* Values for DT_FLAGS */
    261 #define DF_ORIGIN       0x0001  /* Indicates that the object being loaded may
    262                                    make reference to the $ORIGIN substitution
    263                                    string */
    264 #define DF_SYMBOLIC     0x0002  /* Indicates "symbolic" linking. */
    265 #define DF_TEXTREL      0x0004  /* Indicates there may be relocations in
    266                                    non-writable segments. */
    267 #define DF_BIND_NOW     0x0008  /* Indicates that the dynamic linker should
    268                                    process all relocations for the object
    269                                    containing this entry before transferring
    270                                    control to the program. */
    271 #define DF_STATIC_TLS   0x0010  /* Indicates that the shared object or
    272                                    executable contains code using a static
    273                                    thread-local storage scheme. */
     261#define DF_ORIGIN       0x0001  /* Indicates that the object being loaded may
     262                                   make reference to the $ORIGIN substitution
     263                                   string */
     264#define DF_SYMBOLIC     0x0002  /* Indicates "symbolic" linking. */
     265#define DF_TEXTREL      0x0004  /* Indicates there may be relocations in
     266                                   non-writable segments. */
     267#define DF_BIND_NOW     0x0008  /* Indicates that the dynamic linker should
     268                                   process all relocations for the object
     269                                   containing this entry before transferring
     270                                   control to the program. */
     271#define DF_STATIC_TLS   0x0010  /* Indicates that the shared object or
     272                                   executable contains code using a static
     273                                   thread-local storage scheme. */
    274274
    275275/* Values for n_type.  Used in core files. */
    276276#if defined(RT_OS_FREEBSD)
    277 # define NT_PRSTATUS    1       /* Process status. */
    278 # define NT_FPREGSET    2       /* Floating point registers. */
    279 # define NT_PRPSINFO    3       /* Process state info. */
     277# define NT_PRSTATUS    1       /* Process status. */
     278# define NT_FPREGSET    2       /* Floating point registers. */
     279# define NT_PRPSINFO    3       /* Process state info. */
    280280#elif defined(RT_OS_SOLARIS)
    281 # define NT_PRSTATUS    1       /* prstatus_t <sys/old_procfs.h>        */
    282 # define NT_PRFPREG     2       /* prfpregset_t <sys/old_procfs.h>      */
    283 # define NT_PRPSINFO    3       /* prpsinfo_t <sys/old_procfs.h>        */
    284 # define NT_PRXREG      4       /* prxregset_t <sys/procfs.h> */
    285 # define NT_PLATFORM    5       /* string from sysinfo(SI_PLATFORM)     */
    286 # define NT_AUXV        6       /* auxv_t array <sys/auxv.h> */
    287 # define NT_LDT         9       /* ssd array <sys/sysi86.h> IA32 only */
    288 # define NT_PSTATUS     10      /* pstatus_t <sys/procfs.h> */
    289 # define NT_PSINFO      13      /* psinfo_t     <sys/procfs.h> */
    290 # define NT_PRCRED      14      /* prcred_t     <sys/procfs.h> */
    291 # define NT_UTSNAME     15      /* struct utsname <sys/utsname.h> */
    292 # define NT_LWPSTATUS   16      /* lwpstatus_t  <sys/procfs.h> */
    293 # define NT_LWPSINFO    17      /* lwpsinfo_t <sys/procfs.h> */
    294 # define NT_PRPRIV      18      /* prpriv_t     <sys/procfs.h>  */
    295 # define NT_PRPRIVINFO  19      /* priv_impl_info_t <sys/priv.h> */
    296 # define NT_CONTENT     20      /* core_content_t <sys/corectl.h> */
    297 # define NT_ZONENAME    21      /* string from getzonenamebyid(3C) */
    298 # define PF_SUNW_FAILURE        0x00100000      /* mapping absent due to failure */
    299 # define PN_XNUM                0xffff  /* extended program header index */
     281# define NT_PRSTATUS    1       /* prstatus_t <sys/old_procfs.h>        */
     282# define NT_PRFPREG     2       /* prfpregset_t <sys/old_procfs.h>      */
     283# define NT_PRPSINFO    3       /* prpsinfo_t <sys/old_procfs.h>        */
     284# define NT_PRXREG      4       /* prxregset_t <sys/procfs.h> */
     285# define NT_PLATFORM    5       /* string from sysinfo(SI_PLATFORM)     */
     286# define NT_AUXV        6       /* auxv_t array <sys/auxv.h> */
     287# define NT_LDT         9       /* ssd array <sys/sysi86.h> IA32 only */
     288# define NT_PSTATUS     10      /* pstatus_t <sys/procfs.h> */
     289# define NT_PSINFO      13      /* psinfo_t     <sys/procfs.h> */
     290# define NT_PRCRED      14      /* prcred_t     <sys/procfs.h> */
     291# define NT_UTSNAME     15      /* struct utsname <sys/utsname.h> */
     292# define NT_LWPSTATUS   16      /* lwpstatus_t  <sys/procfs.h> */
     293# define NT_LWPSINFO    17      /* lwpsinfo_t <sys/procfs.h> */
     294# define NT_PRPRIV      18      /* prpriv_t     <sys/procfs.h>  */
     295# define NT_PRPRIVINFO  19      /* priv_impl_info_t <sys/priv.h> */
     296# define NT_CONTENT     20      /* core_content_t <sys/corectl.h> */
     297# define NT_ZONENAME    21      /* string from getzonenamebyid(3C) */
     298# define PF_SUNW_FAILURE        0x00100000      /* mapping absent due to failure */
     299# define PN_XNUM                0xffff  /* extended program header index */
    300300#elif defined(RT_OS_LINUX)
    301301# define NT_PRSTATUS     1   /* Process status. */
     
    314314
    315315/* Symbol Binding - ELFNN_ST_BIND - st_info */
    316 #define STB_LOCAL       0       /* Local symbol */
    317 #define STB_GLOBAL      1       /* Global symbol */
    318 #define STB_WEAK        2       /* like global - lower precedence */
    319 #define STB_LOPROC      13      /* reserved range for processor */
    320 #define STB_HIPROC      15      /*  specific symbol bindings */
     316#define STB_LOCAL       0       /* Local symbol */
     317#define STB_GLOBAL      1       /* Global symbol */
     318#define STB_WEAK        2       /* like global - lower precedence */
     319#define STB_LOPROC      13      /* reserved range for processor */
     320#define STB_HIPROC      15      /*  specific symbol bindings */
    321321
    322322/* Symbol type - ELFNN_ST_TYPE - st_info */
    323 #define STT_NOTYPE      0       /* Unspecified type. */
    324 #define STT_OBJECT      1       /* Data object. */
    325 #define STT_FUNC        2       /* Function. */
    326 #define STT_SECTION     3       /* Section. */
    327 #define STT_FILE        4       /* Source file. */
    328 #define STT_TLS         6       /* TLS object. */
    329 #define STT_NUM         7       /* Number of generic symbol types. */
    330 #define STT_LOPROC      13      /* reserved range for processor */
    331 #define STT_HIPROC      15      /*  specific symbol types */
     323#define STT_NOTYPE      0       /* Unspecified type. */
     324#define STT_OBJECT      1       /* Data object. */
     325#define STT_FUNC        2       /* Function. */
     326#define STT_SECTION     3       /* Section. */
     327#define STT_FILE        4       /* Source file. */
     328#define STT_TLS         6       /* TLS object. */
     329#define STT_NUM         7       /* Number of generic symbol types. */
     330#define STT_LOPROC      13      /* reserved range for processor */
     331#define STT_HIPROC      15      /*  specific symbol types */
    332332
    333333/* Special symbol table indexes. */
    334 #define STN_UNDEF       0       /* Undefined symbol index. */
     334#define STN_UNDEF       0       /* Undefined symbol index. */
    335335
    336336#endif
  • trunk/include/iprt/formats/elf-i386.h

    r58636 r62458  
    3737 */
    3838
    39 typedef struct {        /* Auxiliary vector entry on initial stack */
    40         int     a_type;                 /* Entry type. */
    41         union {
    42                 long    a_val;          /* Integer value. */
    43                 void    *a_ptr;         /* Address. */
    44                 void    (*a_fcn)(void); /* Function pointer (not used). */
    45         } a_un;
     39typedef struct {        /* Auxiliary vector entry on initial stack */
     40        int     a_type;                 /* Entry type. */
     41        union {
     42                long    a_val;          /* Integer value. */
     43                void    *a_ptr;         /* Address. */
     44                void    (*a_fcn)(void); /* Function pointer (not used). */
     45        } a_un;
    4646} Elf32_Auxinfo;
    4747
     
    4949/* Fake for amd64 loader support */
    5050typedef struct {
    51         int fake;
     51        int fake;
    5252} Elf64_Auxinfo;
    5353#endif
    5454
    5555/* Values for a_type. */
    56 #define AT_NULL         0       /* Terminates the vector. */
    57 #define AT_IGNORE       1       /* Ignored entry. */
    58 #define AT_EXECFD       2       /* File descriptor of program to load. */
    59 #define AT_PHDR         3       /* Program header of program already loaded. */
    60 #define AT_PHENT        4       /* Size of each program header entry. */
    61 #define AT_PHNUM        5       /* Number of program header entries. */
    62 #define AT_PAGESZ       6       /* Page size in bytes. */
    63 #define AT_BASE         7       /* Interpreter's base address. */
    64 #define AT_FLAGS        8       /* Flags (unused for i386). */
    65 #define AT_ENTRY        9       /* Where interpreter should transfer control. */
     56#define AT_NULL         0       /* Terminates the vector. */
     57#define AT_IGNORE       1       /* Ignored entry. */
     58#define AT_EXECFD       2       /* File descriptor of program to load. */
     59#define AT_PHDR         3       /* Program header of program already loaded. */
     60#define AT_PHENT        4       /* Size of each program header entry. */
     61#define AT_PHNUM        5       /* Number of program header entries. */
     62#define AT_PAGESZ       6       /* Page size in bytes. */
     63#define AT_BASE         7       /* Interpreter's base address. */
     64#define AT_FLAGS        8       /* Flags (unused for i386). */
     65#define AT_ENTRY        9       /* Where interpreter should transfer control. */
    6666
    6767/*
     
    7373 * must not be used in the same context.
    7474 */
    75 #define AT_BRK          10      /* Starting point for sbrk and brk. */
    76 #define AT_DEBUG        11      /* Debugging level. */
     75#define AT_BRK          10      /* Starting point for sbrk and brk. */
     76#define AT_DEBUG        11      /* Debugging level. */
    7777
    7878/*
    7979 * The following non-standard values are used in Linux ELF binaries.
    8080 */
    81 #define AT_NOTELF       10      /* Program is not ELF ?? */
    82 #define AT_UID          11      /* Real uid. */
    83 #define AT_EUID         12      /* Effective uid. */
    84 #define AT_GID          13      /* Real gid. */
    85 #define AT_EGID         14      /* Effective gid. */
     81#define AT_NOTELF       10      /* Program is not ELF ?? */
     82#define AT_UID          11      /* Real uid. */
     83#define AT_EUID         12      /* Effective uid. */
     84#define AT_GID          13      /* Real gid. */
     85#define AT_EGID         14      /* Effective gid. */
    8686
    87 #define AT_COUNT        15      /* Count of defined aux entry types. */
     87#define AT_COUNT        15      /* Count of defined aux entry types. */
    8888
    8989#endif /* later */
     
    9494 */
    9595
    96 #define R_386_NONE      0       /* No relocation. */
    97 #define R_386_32        1       /* Add symbol value. */
    98 #define R_386_PC32      2       /* Add PC-relative symbol value. */
    99 #define R_386_GOT32     3       /* Add PC-relative GOT offset. */
    100 #define R_386_PLT32     4       /* Add PC-relative PLT offset. */
    101 #define R_386_COPY      5       /* Copy data from shared object. */
    102 #define R_386_GLOB_DAT  6       /* Set GOT entry to data address. */
    103 #define R_386_JMP_SLOT  7       /* Set GOT entry to code address. */
    104 #define R_386_RELATIVE  8       /* Add load address of shared object. */
    105 #define R_386_GOTOFF    9       /* Add GOT-relative symbol address. */
    106 #define R_386_GOTPC     10      /* Add PC-relative GOT table address. */
    107 #define R_386_TLS_TPOFF 14      /* Negative offset in static TLS block */
    108 #define R_386_TLS_IE    15      /* Absolute address of GOT for -ve static TLS */
    109 #define R_386_TLS_GOTIE 16      /* GOT entry for negative static TLS block */
    110 #define R_386_TLS_LE    17      /* Negative offset relative to static TLS */
    111 #define R_386_TLS_GD    18      /* 32 bit offset to GOT (index,off) pair */
    112 #define R_386_TLS_LDM   19      /* 32 bit offset to GOT (index,zero) pair */
    113 #define R_386_TLS_GD_32 24      /* 32 bit offset to GOT (index,off) pair */
    114 #define R_386_TLS_GD_PUSH 25    /* pushl instruction for Sun ABI GD sequence */
    115 #define R_386_TLS_GD_CALL 26    /* call instruction for Sun ABI GD sequence */
    116 #define R_386_TLS_GD_POP 27     /* popl instruction for Sun ABI GD sequence */
    117 #define R_386_TLS_LDM_32 28     /* 32 bit offset to GOT (index,zero) pair */
    118 #define R_386_TLS_LDM_PUSH 29   /* pushl instruction for Sun ABI LD sequence */
    119 #define R_386_TLS_LDM_CALL 30   /* call instruction for Sun ABI LD sequence */
    120 #define R_386_TLS_LDM_POP 31    /* popl instruction for Sun ABI LD sequence */
    121 #define R_386_TLS_LDO_32 32     /* 32 bit offset from start of TLS block */
    122 #define R_386_TLS_IE_32 33      /* 32 bit offset to GOT static TLS offset entry */
    123 #define R_386_TLS_LE_32 34      /* 32 bit offset within static TLS block */
    124 #define R_386_TLS_DTPMOD32 35   /* GOT entry containing TLS index */
    125 #define R_386_TLS_DTPOFF32 36   /* GOT entry containing TLS offset */
    126 #define R_386_TLS_TPOFF32 37    /* GOT entry of -ve static TLS offset */
     96#define R_386_NONE      0       /* No relocation. */
     97#define R_386_32        1       /* Add symbol value. */
     98#define R_386_PC32      2       /* Add PC-relative symbol value. */
     99#define R_386_GOT32     3       /* Add PC-relative GOT offset. */
     100#define R_386_PLT32     4       /* Add PC-relative PLT offset. */
     101#define R_386_COPY      5       /* Copy data from shared object. */
     102#define R_386_GLOB_DAT  6       /* Set GOT entry to data address. */
     103#define R_386_JMP_SLOT  7       /* Set GOT entry to code address. */
     104#define R_386_RELATIVE  8       /* Add load address of shared object. */
     105#define R_386_GOTOFF    9       /* Add GOT-relative symbol address. */
     106#define R_386_GOTPC     10      /* Add PC-relative GOT table address. */
     107#define R_386_TLS_TPOFF 14      /* Negative offset in static TLS block */
     108#define R_386_TLS_IE    15      /* Absolute address of GOT for -ve static TLS */
     109#define R_386_TLS_GOTIE 16      /* GOT entry for negative static TLS block */
     110#define R_386_TLS_LE    17      /* Negative offset relative to static TLS */
     111#define R_386_TLS_GD    18      /* 32 bit offset to GOT (index,off) pair */
     112#define R_386_TLS_LDM   19      /* 32 bit offset to GOT (index,zero) pair */
     113#define R_386_TLS_GD_32 24      /* 32 bit offset to GOT (index,off) pair */
     114#define R_386_TLS_GD_PUSH 25    /* pushl instruction for Sun ABI GD sequence */
     115#define R_386_TLS_GD_CALL 26    /* call instruction for Sun ABI GD sequence */
     116#define R_386_TLS_GD_POP 27     /* popl instruction for Sun ABI GD sequence */
     117#define R_386_TLS_LDM_32 28     /* 32 bit offset to GOT (index,zero) pair */
     118#define R_386_TLS_LDM_PUSH 29   /* pushl instruction for Sun ABI LD sequence */
     119#define R_386_TLS_LDM_CALL 30   /* call instruction for Sun ABI LD sequence */
     120#define R_386_TLS_LDM_POP 31    /* popl instruction for Sun ABI LD sequence */
     121#define R_386_TLS_LDO_32 32     /* 32 bit offset from start of TLS block */
     122#define R_386_TLS_IE_32 33      /* 32 bit offset to GOT static TLS offset entry */
     123#define R_386_TLS_LE_32 34      /* 32 bit offset within static TLS block */
     124#define R_386_TLS_DTPMOD32 35   /* GOT entry containing TLS index */
     125#define R_386_TLS_DTPOFF32 36   /* GOT entry containing TLS offset */
     126#define R_386_TLS_TPOFF32 37    /* GOT entry of -ve static TLS offset */
    127127
    128 #define R_386_COUNT     38      /* Count of defined relocation types. */
     128#define R_386_COUNT     38      /* Count of defined relocation types. */
    129129
    130130#endif
  • trunk/include/iprt/formats/elf.h

    r58636 r62458  
    3838typedef Elf64_Size          Elf_Size;
    3939typedef Elf64_Hashelt       Elf_Hashelt;
    40 typedef Elf64_Ehdr          Elf_Ehdr;
    41 typedef Elf64_Shdr          Elf_Shdr;
    42 typedef Elf64_Phdr          Elf_Phdr;
    43 typedef Elf64_Nhdr          Elf_Nhdr;
    44 typedef Elf64_Dyn           Elf_Dyn;
    45 typedef Elf64_Rel           Elf_Rel;
    46 typedef Elf64_Rela          Elf_Rela;
    47 typedef Elf64_Sym           Elf_Sym;
     40typedef Elf64_Ehdr          Elf_Ehdr;
     41typedef Elf64_Shdr          Elf_Shdr;
     42typedef Elf64_Phdr          Elf_Phdr;
     43typedef Elf64_Nhdr          Elf_Nhdr;
     44typedef Elf64_Dyn           Elf_Dyn;
     45typedef Elf64_Rel           Elf_Rel;
     46typedef Elf64_Rela          Elf_Rela;
     47typedef Elf64_Sym           Elf_Sym;
    4848
    4949#define ELF_R_SYM           ELF64_R_SYM
     
    6363typedef Elf32_Size          Elf_Size;
    6464typedef Elf32_Hashelt       Elf_Hashelt;
    65 typedef Elf32_Ehdr          Elf_Ehdr;
    66 typedef Elf32_Shdr          Elf_Shdr;
    67 typedef Elf32_Phdr          Elf_Phdr;
    68 typedef Elf32_Nhdr          Elf_Nhdr;
    69 typedef Elf32_Dyn           Elf_Dyn;
    70 typedef Elf32_Rel           Elf_Rel;
    71 typedef Elf32_Rela          Elf_Rela;
    72 typedef Elf32_Sym           Elf_Sym;
     65typedef Elf32_Ehdr          Elf_Ehdr;
     66typedef Elf32_Shdr          Elf_Shdr;
     67typedef Elf32_Phdr          Elf_Phdr;
     68typedef Elf32_Nhdr          Elf_Nhdr;
     69typedef Elf32_Dyn           Elf_Dyn;
     70typedef Elf32_Rel           Elf_Rel;
     71typedef Elf32_Rela          Elf_Rela;
     72typedef Elf32_Sym           Elf_Sym;
    7373
    7474#define ELF_R_SYM           ELF32_R_SYM
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette