dde51bcd9993c7904cd11392164131393b059a63
[centaur.git] / include / libelfu / elfops.h
1 /*!
2  * @file elfops.h
3  * @brief Operations offered by libelfu on libelf handles
4  *
5  * This includes:
6  *  - Checks
7  *  - Post-processing for ELF specification compliance
8  */
9
10 #ifndef __LIBELFU_ELFOPS_H_
11 #define __LIBELFU_ELFOPS_H_
12
13 #include <libelf.h>
14 #include <gelf.h>
15
16 #include <libelfu/types.h>
17
18
19 /*!
20  * @brief Perform a large array of sanity checks.
21  * @param e libelf handle to file to be checked.
22  * @result 0 if successful.
23  *         Anything else indicates an error.
24  * @note If a file does not pass these checks,
25  *       then it cannot be processed by libelfu.
26  */
27 int elfu_eCheck(Elf *e);
28
29
30
31 /*!
32  * @brief Reorder PHDRs to comply with ELF specification.
33  * @param e libelf handle to file to be post-processed.
34  */
35 void elfu_eReorderPhdrs(Elf *e);
36
37
38 #endif