11 extern int Binary_GetSymbol(const char *SymbolName, uintptr_t *Value, size_t *Size, void *IgnoreBase);
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, void *IgnoreBase)
20 if( !Binary_GetSymbol(sym, &rv, sz, IgnoreBase) )
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)
40 extern int AllocateMemory(uintptr_t VirtAddr, size_t ByteCount);
41 extern uintptr_t FindFreeRange(size_t ByteCount, int MaxBits);
43 extern void Warning(const char *Format, ...);
44 extern void Notice(const char *Format, ...);
45 extern void Debug(const char *Format, ...);
46 #define SysDebug Debug
48 #define ACESS_SEEK_CUR 0
49 #define ACESS_SEEK_SET 1
50 #define ACESS_SEEK_END -1
54 typedef struct sBinFmt {
57 void *(*Load)(int fd);
58 uintptr_t (*Relocate)(void *base);
59 int (*GetSymbol)(void*,char*,uintptr_t*,size_t*);