diff options
Diffstat (limited to 'translate/grt/config/linux.c')
-rw-r--r-- | translate/grt/config/linux.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/translate/grt/config/linux.c b/translate/grt/config/linux.c index 047cfd1b4..3159cd613 100644 --- a/translate/grt/config/linux.c +++ b/translate/grt/config/linux.c @@ -22,6 +22,7 @@ #include <signal.h> #include <fcntl.h> #include <sys/ucontext.h> +#include <stdlib.h> //#include <stdint.h> /* On x86, the stack growns downward. */ @@ -262,6 +263,13 @@ grt_stack_allocate (void) res = (struct stack_context *)(base + sizeof (struct stack_context)); #endif +#ifdef __ia64__ + /* Also allocate BSP. */ + if (mmap (base, page_size, PROT_READ | PROT_WRITE, + MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, MMAP_FILEDES, 0) != base) + return NULL; +#endif + res->cur_sp = (void *)res; res->cur_length = stack_size; return res; |