4 #include <org/ibex/plat/Linux.h>
7 extern const char **_Jv_argv;
10 void org::ibex::plat::Linux::fixEnvironment() {
11 // this wreaks havoc on gdb
12 // see http://lists.debian.org/debian-glibc/2003/debian-glibc-200311/msg00647.html
13 const char* ld_assume_kernel = getenv("LD_ASSUME_KERNEL");
14 if (ld_assume_kernel == NULL || strcmp("2.4.1", ld_assume_kernel)) {
16 printf("respawning self (%s) with LD_ASSUME_KERNEL=2.4.1\n", _Jv_argv[0]);
17 setenv("LD_ASSUME_KERNEL", "2.4.1", 1);
18 result = execvp(_Jv_argv[0], (char* const*)((void*)_Jv_argv));
19 printf("execvp() failed with error code %d\n", result);