1 /* This file is part of centaur.
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.
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.
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/>.
18 * @brief Operations offered by libelfu on libelf handles
22 * - Post-processing for ELF specification compliance
25 #ifndef __LIBELFU_ELFOPS_H_
26 #define __LIBELFU_ELFOPS_H_
31 #include <libelfu/types.h>
35 * @brief Perform a large array of sanity checks.
36 * @param e libelf handle to file to be checked.
37 * @result 0 if successful.
38 * Anything else indicates an error.
39 * @note If a file does not pass these checks,
40 * then it cannot be processed by libelfu.
42 int elfu_eCheck(Elf *e);
47 * @brief Reorder PHDRs to comply with ELF specification.
48 * @param e libelf handle to file to be post-processed.
50 void elfu_eReorderPhdrs(Elf *e);