X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fld-acess_src%2Fcommon.h;h=0bdc40f247af7cd30556986bda41fff22f2481d1;hb=c01cd6b0f42fa4cd400c5d9493c8b7ec92e72c5b;hp=0d1dee886faf58c8aa37136d9c3526018477368c;hpb=b4e2712f6a0849de53207ad50a38c9f468f22651;p=tpg%2Facess2.git diff --git a/AcessNative/ld-acess_src/common.h b/AcessNative/ld-acess_src/common.h index 0d1dee88..0bdc40f2 100644 --- a/AcessNative/ld-acess_src/common.h +++ b/AcessNative/ld-acess_src/common.h @@ -8,18 +8,19 @@ #include #include -extern int Binary_GetSymbol(const char *SymbolName, uintptr_t *Value, size_t *Size); +extern int Binary_GetSymbol(const char *SymbolName, uintptr_t *Value, size_t *Size, void *IgnoreBase); extern void *Binary_LoadLibrary(const char *Path); extern void *Binary_Load(const char *Path, uintptr_t *EntryPoint); extern void Binary_SetReadyToUse(void *Base); // HACKS - So this can share the usermode elf.c -static inline void *GetSymbol(const char*sym, size_t*sz) +static inline int GetSymbol(const char *sym, void **val, size_t *sz, void *IgnoreBase) { uintptr_t rv; - if( !Binary_GetSymbol(sym, &rv, sz) ) - return NULL; - return (void*)rv; + if( !Binary_GetSymbol(sym, &rv, sz, IgnoreBase) ) + return 0; + *val = (void*)rv; + return 1; } static inline void *LoadLibrary(const char *Name, const char *SearchPath, char **envp) { @@ -30,6 +31,12 @@ static inline void AddLoaded(const char *Path, void *Base) Binary_SetReadyToUse(Base); } +static inline int _SysSetMemFlags(uintptr_t Addr, unsigned int flags, unsigned int mask) +{ + return 0; +} + + extern int AllocateMemory(uintptr_t VirtAddr, size_t ByteCount); extern uintptr_t FindFreeRange(size_t ByteCount, int MaxBits);