Preserve thread-context area as early as possible

This commit is contained in:
Christian Helmuth 2013-09-26 12:38:45 +02:00
parent b0559dabfc
commit 4556a9e353
1 changed files with 6 additions and 3 deletions

View File

@ -236,6 +236,12 @@ extern "C" int _main()
/* initialize exception handling */
init_exception_handling();
/*
* We create the thread-context area as early as possible to prevent other
* mappings from occupying the predefined virtual-memory region.
*/
env_context_area_rm_session();
/*
* Trigger first exception. This step has two purposes.
* First, it enables us to detect problems related to exception handling as
@ -261,9 +267,6 @@ extern "C" int _main()
/* now, it is save to call printf */
/* create the thread context area RM session */
env_context_area_rm_session();
/* enable tracing support */
inhibit_tracing = false;