2015-07-30 19:38:20 -04:00
|
|
|
#ifndef __DYLD_H
|
|
|
|
#define __DYLD_H
|
|
|
|
|
|
|
|
#include <elf.h>
|
|
|
|
|
|
|
|
struct dyld_info {
|
|
|
|
Elf32_Addr base;
|
2015-08-08 08:21:09 -04:00
|
|
|
const void *init;
|
2015-07-30 19:38:20 -04:00
|
|
|
const char *strtab;
|
2015-08-08 08:21:09 -04:00
|
|
|
const Elf32_Sym *symtab;
|
2015-07-30 19:38:20 -04:00
|
|
|
struct {
|
|
|
|
Elf32_Word nbucket;
|
|
|
|
Elf32_Word nchain;
|
2015-08-08 08:21:09 -04:00
|
|
|
const Elf32_Word *bucket;
|
|
|
|
const Elf32_Word *chain;
|
2015-07-30 19:38:20 -04:00
|
|
|
} hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-08-08 08:21:09 -04:00
|
|
|
int dyld_load(const void *shlib, Elf32_Addr base,
|
2015-07-30 19:38:20 -04:00
|
|
|
Elf32_Addr (*resolve_import)(const char *),
|
|
|
|
struct dyld_info *info, const char **error_out);
|
|
|
|
void *dyld_lookup(const char *symbol, struct dyld_info *info);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __DYLD_H */
|