VirtualBox

source: vbox/trunk/include/iprt/formats/elf.h@ 90114

Last change on this file since 90114 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: elf.h 82968 2020-02-04 10:35:17Z vboxsync $ */
2/** @file
3 * ELF types, current architecture.
4 */
5
6/*
7 * Copyright (C) 2010-2020 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 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef IPRT_INCLUDED_formats_elf_h
28#define IPRT_INCLUDED_formats_elf_h
29#ifndef RT_WITHOUT_PRAGMA_ONCE
30# pragma once
31#endif
32
33#if defined(RT_ARCH_AMD64)
34# include "elf64.h"
35typedef Elf64_Addr Elf_Addr;
36typedef Elf64_Half Elf_Half;
37typedef Elf64_Off Elf_Off;
38typedef Elf64_Sword Elf_Sword;
39typedef Elf64_Word Elf_Word;
40typedef Elf64_Size Elf_Size;
41typedef Elf64_Hashelt Elf_Hashelt;
42typedef Elf64_Ehdr Elf_Ehdr;
43typedef Elf64_Shdr Elf_Shdr;
44typedef Elf64_Phdr Elf_Phdr;
45typedef Elf64_Nhdr Elf_Nhdr;
46typedef Elf64_Dyn Elf_Dyn;
47typedef Elf64_Rel Elf_Rel;
48typedef Elf64_Rela Elf_Rela;
49typedef Elf64_Sym Elf_Sym;
50
51#define ELF_R_SYM ELF64_R_SYM
52#define ELF_R_TYPE ELF64_R_TYPE
53#define ELF_R_INFO ELF64_R_INFO
54#define ELF_ST_BIND ELF64_ST_BIND
55#define ELF_ST_TYPE ELF64_ST_TYPE
56#define ELF_ST_INFO ELF64_ST_INFO
57
58#elif defined(RT_ARCH_X86)
59# include "elf32.h"
60typedef Elf32_Addr Elf_Addr;
61typedef Elf32_Half Elf_Half;
62typedef Elf32_Off Elf_Off;
63typedef Elf32_Sword Elf_Sword;
64typedef Elf32_Word Elf_Word;
65typedef Elf32_Size Elf_Size;
66typedef Elf32_Hashelt Elf_Hashelt;
67typedef Elf32_Ehdr Elf_Ehdr;
68typedef Elf32_Shdr Elf_Shdr;
69typedef Elf32_Phdr Elf_Phdr;
70typedef Elf32_Nhdr Elf_Nhdr;
71typedef Elf32_Dyn Elf_Dyn;
72typedef Elf32_Rel Elf_Rel;
73typedef Elf32_Rela Elf_Rela;
74typedef Elf32_Sym Elf_Sym;
75
76#define ELF_R_SYM ELF32_R_SYM
77#define ELF_R_TYPE ELF32_R_TYPE
78#define ELF_R_INFO ELF32_R_INFO
79#define ELF_ST_BIND ELF32_ST_BIND
80#define ELF_ST_TYPE ELF32_ST_TYPE
81#define ELF_ST_INFO ELF32_ST_INFO
82
83#else
84# error Unknown arch!
85#endif
86
87#endif /* !IPRT_INCLUDED_formats_elf_h */
88
Note: See TracBrowser for help on using the repository browser.

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