aboutsummaryrefslogtreecommitdiff
path: root/src/clients/reconcilio/littlelf/elf_types.hh
blob: 3797197dfb3552178037063b439eb4dfd124fd05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef ELFTYPES_HH_
#define ELFTYPES_HH_

#include <elf.h>

struct Elf32Type
{
    enum {
        elf_class = ELFCLASS32
    };

    typedef Elf32_Ehdr Header;
    typedef Elf32_Shdr SectionHeader;
    typedef Elf32_Sym  Symbol;
    typedef Elf32_Dyn  DynamicEntry;
    typedef Elf32_Rel  Relocation;
    typedef Elf32_Rela RelocationA;

    typedef Elf32_Off    Offset;
    typedef Elf32_Half   Half;
    typedef Elf32_Word   Word;
    typedef Elf32_Xword  Xword;
    typedef Elf32_Sxword Sxword;
    typedef Elf32_Addr   Address;

    typedef Elf32_Word  DynamicValue;
    typedef Elf32_Addr  DynamicPointer;
    typedef Elf32_Sword DynamicTag;

    typedef Elf32_Addr  RelocationOffset;
    typedef Elf32_Word  RelocationInfo;
    typedef Elf32_Sword RelocationAddend;

    typedef Elf32_Word SectionSize;
};

struct Elf64Type
{
    enum {
        elf_class = ELFCLASS64
    };

    typedef Elf64_Ehdr Header;
    typedef Elf64_Shdr SectionHeader;
    typedef Elf64_Sym  Symbol;
    typedef Elf64_Dyn  DynamicEntry;
    typedef Elf64_Rel  Relocation;
    typedef Elf64_Rela RelocationA;

    typedef Elf64_Off    Offset;
    typedef Elf64_Half   Half;
    typedef Elf64_Word   Word;
    typedef Elf64_Xword  Xword;
    typedef Elf64_Sxword Sxword;
    typedef Elf64_Addr   Address;

    typedef Elf32_Xword  DynamicValue;
    typedef Elf64_Addr   DynamicPointer;
    typedef Elf64_Sxword DynamicTag;

    typedef Elf64_Addr   RelocationOffset;
    typedef Elf64_Xword  RelocationInfo;
    typedef Elf64_Sxword RelocationAddend;

    typedef Elf64_Xword SectionSize;
};

#endif /*ELFTYPES_HH_*/