diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-06-25 11:15:42 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-06-25 11:15:42 +0200 |
| commit | 1c26df2a908863ba69f602178e8aaf6be37e8851 (patch) | |
| tree | 3f6e08fcfeb381508cd8650909219731ec4277e2 /src/libtools | |
| parent | c60e4839ebde63937d37aa751235c86a00379f7c (diff) | |
| download | box64-1c26df2a908863ba69f602178e8aaf6be37e8851.tar.gz box64-1c26df2a908863ba69f602178e8aaf6be37e8851.zip | |
Added getauxval wrapped function
Diffstat (limited to 'src/libtools')
| -rwxr-xr-x | src/libtools/auxval.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libtools/auxval.c b/src/libtools/auxval.c index 82c6fd35..e1cc87b0 100755 --- a/src/libtools/auxval.c +++ b/src/libtools/auxval.c @@ -15,8 +15,8 @@ #include "box64context.h" #include "debug.h" -//#include "x64emu.h" -//#include "emu/x64emu_private.h" +#include "x64emu.h" +#include "emu/x64emu_private.h" #include "box64stack.h" #include "auxval.h" @@ -49,13 +49,13 @@ unsigned long real_getauxval(unsigned long type) return 0; } -//EXPORT unsigned long my_getauxval(x64emu_t* emu, unsigned long type) -//{ -// uintptr_t* p = emu->context->auxval_start; -// while(*p) { -// if(*p == type) -// return p[1]; -// p+=2; -// } -// return 0; -//} +EXPORT unsigned long my_getauxval(x64emu_t* emu, unsigned long type) +{ + uintptr_t* p = emu->context->auxval_start; + while(*p) { + if(*p == type) + return p[1]; + p+=2; + } + return 0; +} |