README.md: x86-32/64 support
[centaur.git] / include / elfhandle.h
1 /* This file is part of centaur.
2  *
3  * centaur is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License 2 as
5  * published by the Free Software Foundation.
6
7  * centaur is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11
12  * You should have received a copy of the GNU General Public License
13  * along with centaur.  If not, see <http://www.gnu.org/licenses/>.
14  */
15
16 #ifndef __ELFHANDLE_H__
17 #define __ELFHANDLE_H__
18
19 #include <libelf.h>
20
21 /*!
22  * A simple pair of a file descriptor and a libelf handle,
23  * used to simplify elfucli.
24  */
25 typedef struct {
26   int fd;   /*!< File handle */
27   Elf *e;   /*!< libelf handle */
28 } ELFHandles;
29
30
31 void openElf(ELFHandles *h, char *fn, Elf_Cmd elfmode);
32 void closeElf(ELFHandles *h);
33
34 #endif