1 | /* $Id: ldrElf.h 31965 2010-08-25 15:27:55Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * ELF types, current architecture.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | #ifndef ___internal_ldrELF_h
|
---|
20 | #define ___internal_ldrELF_h
|
---|
21 |
|
---|
22 | #if defined(RT_ARCH_AMD64)
|
---|
23 | # include "ldrELF64.h"
|
---|
24 | typedef Elf64_Addr Elf_Addr;
|
---|
25 | typedef Elf64_Half Elf_Half;
|
---|
26 | typedef Elf64_Off Elf_Off;
|
---|
27 | typedef Elf64_Sword Elf_Sword;
|
---|
28 | typedef Elf64_Word Elf_Word;
|
---|
29 | typedef Elf64_Size Elf_Size;
|
---|
30 | typedef Elf64_Hashelt Elf_Hashelt;
|
---|
31 | typedef Elf64_Ehdr Elf_Hdr;
|
---|
32 | typedef Elf64_Shdr Elf_Shdr;
|
---|
33 | typedef Elf64_Phdr Elf_Phdr;
|
---|
34 | typedef Elf64_Nhdr Elf_Nhdr;
|
---|
35 | typedef Elf64_Dyn Elf_Dyn;
|
---|
36 | typedef Elf64_Rel Elf_Rel;
|
---|
37 | typedef Elf64_Rela Elf_Rela;
|
---|
38 | typedef Elf64_Sym Elf_Sym;
|
---|
39 |
|
---|
40 | #define ELF_R_SYM ELF64_R_SYM
|
---|
41 | #define ELF_R_TYPE ELF64_R_TYPE
|
---|
42 | #define ELF_R_INFO ELF64_R_INFO
|
---|
43 | #define ELF_ST_BIND ELF64_ST_BIND
|
---|
44 | #define ELF_ST_TYPE ELF64_ST_TYPE
|
---|
45 | #define ELF_ST_INFO ELF64_ST_INFO
|
---|
46 |
|
---|
47 | #elif defined(RT_ARCH_X86)
|
---|
48 | # include "ldrELF32.h"
|
---|
49 | typedef Elf32_Addr Elf_Addr;
|
---|
50 | typedef Elf32_Half Elf_Half;
|
---|
51 | typedef Elf32_Off Elf_Off;
|
---|
52 | typedef Elf32_Sword Elf_Sword;
|
---|
53 | typedef Elf32_Word Elf_Word;
|
---|
54 | typedef Elf32_Size Elf_Size;
|
---|
55 | typedef Elf32_Hashelt Elf_Hashelt;
|
---|
56 | typedef Elf32_Ehdr Elf_Hdr;
|
---|
57 | typedef Elf32_Shdr Elf_Shdr;
|
---|
58 | typedef Elf32_Phdr Elf_Phdr;
|
---|
59 | typedef Elf32_Nhdr Elf_Nhdr;
|
---|
60 | typedef Elf32_Dyn Elf_Dyn;
|
---|
61 | typedef Elf32_Rel Elf_Rel;
|
---|
62 | typedef Elf32_Rela Elf_Rela;
|
---|
63 | typedef Elf32_Sym Elf_Sym;
|
---|
64 |
|
---|
65 | #define ELF_R_SYM ELF32_R_SYM
|
---|
66 | #define ELF_R_TYPE ELF32_R_TYPE
|
---|
67 | #define ELF_R_INFO ELF32_R_INFO
|
---|
68 | #define ELF_ST_BIND ELF32_ST_BIND
|
---|
69 | #define ELF_ST_TYPE ELF32_ST_TYPE
|
---|
70 | #define ELF_ST_INFO ELF32_ST_INFO
|
---|
71 |
|
---|
72 | #else
|
---|
73 | # error Unknown arch!
|
---|
74 | #endif
|
---|
75 |
|
---|
76 | #endif /* ___internal_ldrELF_h */
|
---|
77 |
|
---|