2014-07-04 23:49:08 +08:00
|
|
|
#ifndef __ELF_LOADER_H
|
|
|
|
#define __ELF_LOADER_H
|
|
|
|
|
2014-07-06 01:39:49 +08:00
|
|
|
struct symbol {
|
2014-09-05 12:03:22 +08:00
|
|
|
char *name;
|
|
|
|
void *target;
|
2014-07-06 01:39:49 +08:00
|
|
|
};
|
|
|
|
|
2014-09-15 22:40:33 +08:00
|
|
|
typedef void * (*symbol_resolver)(const char *);
|
|
|
|
typedef int (*symbol_callback)(const char *, void *);
|
2014-08-28 16:56:48 +08:00
|
|
|
|
2014-09-15 22:40:33 +08:00
|
|
|
void *find_symbol(const struct symbol *symbols, const char *name);
|
|
|
|
int load_elf(symbol_resolver resolver, symbol_callback callback, void *elf_data, int elf_length, void *dest, int dest_length);
|
2014-07-04 23:49:08 +08:00
|
|
|
|
|
|
|
#endif /* __ELF_LOADER_H */
|