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 int GetSymbol(const char *sym, void **val, size_t *sz)
20 if( !Binary_GetSymbol(sym, &rv, sz) )
25 static inline void *LoadLibrary(const char *Name, const char *SearchPath, char **envp)
27 return Binary_LoadLibrary(Name);
29 static inline void AddLoaded(const char *Path, void *Base)
31 Binary_SetReadyToUse(Base);
34 static inline int SysSetMemFlags(uintptr_t Addr, unsigned int flags, unsigned int mask)
39 extern int AllocateMemory(uintptr_t VirtAddr, size_t ByteCount);
40 extern uintptr_t FindFreeRange(size_t ByteCount, int MaxBits);
42 extern void Warning(const char *Format, ...);
43 extern void Notice(const char *Format, ...);
44 extern void Debug(const char *Format, ...);
45 #define SysDebug Debug
47 #define ACESS_SEEK_CUR 0
48 #define ACESS_SEEK_SET 1
49 #define ACESS_SEEK_END -1
53 typedef struct sBinFmt {
56 void *(*Load)(int fd);
57 uintptr_t (*Relocate)(void *base);
58 int (*GetSymbol)(void*,char*,uintptr_t*,size_t*);