diff options
Diffstat (limited to 'src/wrapped/wrappedldlinux.c')
| -rw-r--r-- | src/wrapped/wrappedldlinux.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wrapped/wrappedldlinux.c b/src/wrapped/wrappedldlinux.c index 83245e93..90ec1b23 100644 --- a/src/wrapped/wrappedldlinux.c +++ b/src/wrapped/wrappedldlinux.c @@ -34,14 +34,25 @@ void stSetup(box64context_t* context) my___libc_stack_end = context->stack; // is this the end, or should I add stasz? } +#ifdef STATICBUILD +#include <link.h> +extern void* __libc_enable_secure; +extern void* __stack_chk_guard; +//extern void* __pointer_chk_guard; +//extern void* _rtld_global; +//extern void* _rtld_global_ro; +#endif + // don't try to load the actual ld-linux (because name is variable), just use box64 itself, as it's linked to ld-linux const char* ldlinuxName = "ld-linux.so.2"; #define LIBNAME ldlinux +#ifndef STATICBUILD #define PRE_INIT\ if(1) \ lib->w.lib = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); \ else +#endif #define CUSTOM_INIT \ stSetup(box64); \ |