X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FLibraries%2Fld-acess.so_src%2Fmain.c;h=49b2f86382cdf3e757135a8967debd15f851d8b4;hb=30c11f371da98d13344e8bed3766d3e574a65ac9;hp=ff715bb33502853568f04b76e7d694745098b011;hpb=032ec5adf8d4faeaa9293da50ad2e32c83dd1704;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/ld-acess.so_src/main.c b/Usermode/Libraries/ld-acess.so_src/main.c index ff715bb3..49b2f863 100644 --- a/Usermode/Libraries/ld-acess.so_src/main.c +++ b/Usermode/Libraries/ld-acess.so_src/main.c @@ -13,6 +13,8 @@ void *DoRelocate(void *base, char **envp, const char *Filename); // === Imports === extern char gLinkedBase[]; extern tLoadedLib gLoadedLibraries[]; +char **gEnvP; +extern int memcmp(const void *m1, const void *m2, size_t size); // === CODE === /** @@ -20,10 +22,12 @@ extern tLoadedLib gLoadedLibraries[]; \brief Library entry point \note This is the entrypoint for the library */ -void *SoMain(void *base) +void *SoMain(void *base, int argc, char **argv, char **envp) { void *ret; + gEnvP = envp; + // - Assume that the file pointer will be less than 4096 if((intptr_t)base < 0x1000) { SysDebug("ld-acess - SoMain: Passed file pointer %i\n", base);