Changes in abi/include/abi/elf.h [ca0e838:84176f3] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/elf.h

    rca0e838 r84176f3  
    7777        EM_IA_64       = 50,   /* IA-64 */
    7878        EM_X86_64      = 62,   /* AMD64/EMT64 */
     79        EM_AARCH64     = 183,  /* ARM 64-bit architecture */
    7980        EM_RISCV       = 243,  /* RISC-V */
    8081};
     
    242243        PF_W = 2,
    243244        PF_R = 4,
     245};
     246
     247/**
     248 * Dynamic array tags
     249 */
     250enum elf_dynamic_tag {
     251        DT_NULL     = 0,
     252        DT_NEEDED   = 1,
     253        DT_PLTRELSZ = 2,
     254        DT_PLTGOT   = 3,
     255        DT_HASH     = 4,
     256        DT_STRTAB   = 5,
     257        DT_SYMTAB   = 6,
     258        DT_RELA     = 7,
     259        DT_RELASZ   = 8,
     260        DT_RELAENT  = 9,
     261        DT_STRSZ    = 10,
     262        DT_SYMENT   = 11,
     263        DT_INIT     = 12,
     264        DT_FINI     = 13,
     265        DT_SONAME   = 14,
     266        DT_RPATH    = 15,
     267        DT_SYMBOLIC = 16,
     268        DT_REL      = 17,
     269        DT_RELSZ    = 18,
     270        DT_RELENT   = 19,
     271        DT_PLTREL   = 20,
     272        DT_DEBUG    = 21,
     273        DT_TEXTREL  = 22,
     274        DT_JMPREL   = 23,
     275        DT_BIND_NOW = 24,
     276        DT_LOPROC   = 0x70000000,
     277        DT_HIPROC   = 0x7fffffff,
     278};
     279
     280/**
     281 * Special section indexes
     282 */
     283enum {
     284        SHN_UNDEF     = 0,
     285        SHN_LORESERVE = 0xff00,
     286        SHN_LOPROC    = 0xff00,
     287        SHN_HIPROC    = 0xff1f,
     288        SHN_ABS       = 0xfff1,
     289        SHN_COMMON    = 0xfff2,
     290        SHN_HIRESERVE = 0xffff,
     291};
     292
     293/**
     294 * Special symbol table index
     295 */
     296enum {
     297        STN_UNDEF = 0,
    244298};
    245299
     
    406460};
    407461
     462/**
     463 * Dynamic structure
     464 */
     465struct elf32_dyn {
     466        elf_sword d_tag;
     467        union {
     468                elf_word d_val;
     469                elf32_addr d_ptr;
     470        } d_un;
     471};
     472
     473struct elf64_dyn {
     474        elf_sxword d_tag;
     475        union {
     476                elf_xword d_val;
     477                elf64_addr d_ptr;
     478        } d_un;
     479};
     480
     481struct elf32_rel {
     482        elf32_addr r_offset;
     483        elf_word r_info;
     484};
     485
     486struct elf32_rela {
     487        elf32_addr r_offset;
     488        elf_word r_info;
     489        elf_sword r_addend;
     490};
     491
     492struct elf64_rel {
     493        elf64_addr r_offset;
     494        elf_xword r_info;
     495};
     496
     497struct elf64_rela {
     498        elf64_addr r_offset;
     499        elf_xword r_info;
     500        elf_sxword r_addend;
     501};
     502
     503#define ELF32_R_SYM(i) ((i) >> 8)
     504#define ELF32_R_TYPE(i) ((unsigned char)(i))
     505
     506#define ELF64_R_SYM(i) ((i) >> 32)
     507#define ELF64_R_TYPE(i) ((i) & 0xffffffffL)
     508
    408509#ifdef __32_BITS__
    409510typedef struct elf32_header elf_header_t;
     
    412513typedef struct elf32_symbol elf_symbol_t;
    413514typedef struct elf32_note elf_note_t;
     515typedef struct elf32_dyn elf_dyn_t;
     516typedef struct elf32_rel elf_rel_t;
     517typedef struct elf32_rela elf_rela_t;
     518#define ELF_R_TYPE(i)  ELF32_R_TYPE(i)
    414519#endif
    415520
     
    420525typedef struct elf64_symbol elf_symbol_t;
    421526typedef struct elf64_note elf_note_t;
     527typedef struct elf64_dyn elf_dyn_t;
     528typedef struct elf64_rel elf_rel_t;
     529typedef struct elf64_rela elf_rela_t;
     530#define ELF_R_TYPE(i)  ELF64_R_TYPE(i)
    422531#endif
    423532
Note: See TracChangeset for help on using the changeset viewer.