11 extern int Binary_GetSymbol(const char *SymbolName, uintptr_t *Value, size_t *Size);
12 extern void *Binary_LoadLibrary(const char *Path);
13 extern void *Binary_Load(const char *Path, uintptr_t *EntryPoint);
14 extern void Binary_SetReadyToUse(void *Base);
16 // HACKS - So this can share the usermode elf.c
17 static inline void *GetSymbol(const char*sym, size_t*sz)
20 if( !Binary_GetSymbol(sym, &rv, sz) )
24 static inline void *LoadLibrary(const char *Name, const char *SearchPath, char **envp)
26 return Binary_LoadLibrary(Name);
28 static inline void AddLoaded(const char *Path, void *Base)
30 Binary_SetReadyToUse(Base);
33 extern int AllocateMemory(uintptr_t VirtAddr, size_t ByteCount);
34 extern uintptr_t FindFreeRange(size_t ByteCount, int MaxBits);
36 extern void Warning(const char *Format, ...);
37 extern void Notice(const char *Format, ...);
38 extern void Debug(const char *Format, ...);
39 #define SysDebug Debug
41 #define ACESS_SEEK_CUR 0
42 #define ACESS_SEEK_SET 1
43 #define ACESS_SEEK_END -1
47 typedef struct sBinFmt {
50 void *(*Load)(int fd);
51 uintptr_t (*Relocate)(void *base);
52 int (*GetSymbol)(void*,char*,uintptr_t*,size_t*);