1 /**
2 * @file elfwrap.c
3 *
4 * @brief
5 * IBL wrapper for the elf loader
6 */
8 #include "types.h"
9 #include "ibl.h"
10 #include "iblloc.h"
11 #include "ewrap.h"
12 #include "dload_api.h"
13 #include "ibl_elf.h"
14 #include "file_ovr.h"
16 /**
17 * @brief
18 * Required for the dload module
19 */
20 BOOL DLL_debug = FALSE;
22 /**
23 * @brief
24 * Load an elf file
25 */
26 void iblBootElf (BOOT_MODULE_FXN_TABLE *bootFxn, Uint32 *ientry_point)
27 {
28 int argc;
29 char **argv;
30 int32_t dloadHandle;
32 dloadHandle = DLOAD_load (bootFxn, argc, argv, ientry_point);
34 }
36 /**
37 * @brief
38 * Look for the elf signature in the 1st 4 bytes of a data file
39 */
40 BOOL iblIsElf (Uint8 *elfhdr)
41 {
42 if ( (elfhdr[0] == 0x7f) &&
43 (elfhdr[1] == 'E') &&
44 (elfhdr[2] == 'L') &&
45 (elfhdr[3] == 'F') )
46 return (TRUE);
48 return (FALSE);
50 }