X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fld-acess_src%2Fbinary.c;h=3ae8d7f12be57dd56214592031157dd1db8d7c41;hb=2c3ab58b961dea91fdfbf432a7fdf9593c6e7a8e;hp=d3dee99a7797097720aa8f4dab0c891c963abe58;hpb=7f80ab30017689efe0aaaab18abc7ceda689d859;p=tpg%2Facess2.git diff --git a/AcessNative/ld-acess_src/binary.c b/AcessNative/ld-acess_src/binary.c index d3dee99a..3ae8d7f1 100644 --- a/AcessNative/ld-acess_src/binary.c +++ b/AcessNative/ld-acess_src/binary.c @@ -96,7 +96,7 @@ void *Binary_LoadLibrary(const char *Name) { char *path; void *ret; - int (*entry)(int,char*[],char**) = NULL; + int (*entry)(void *,int,char*[],char**) = NULL; // Find File path = Binary_LocateLibrary(Name); @@ -108,6 +108,7 @@ void *Binary_LoadLibrary(const char *Name) } ret = Binary_Load(path, (uintptr_t*)&entry); + printf("LOADED '%s' to %p (Entry=%p)\n", path, ret, entry); free(path); #if DEBUG @@ -118,7 +119,7 @@ void *Binary_LoadLibrary(const char *Name) #if DEBUG printf("Calling '%s' entry point %p\n", Name, entry); #endif - entry(0, argv, NULL); + entry(ret, 0, argv, NULL); } return ret; @@ -239,7 +240,7 @@ int Binary_GetSymbol(const char *SymbolName, uintptr_t *Value) } } - // TODO: Search list of loaded binaries + // Search list of loaded binaries for(bin = gLoadedBinaries; bin; bin = bin->Next) { if( !bin->Ready ) continue;