aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/sandbox/cpu/start.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 63ca514..6bb9447 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -436,10 +436,13 @@ void sandbox_reset(void)
int main(int argc, char *argv[])
{
struct sandbox_state *state;
+ void * text_base;
gd_t data;
int size;
int ret;
+ text_base = os_find_text_base();
+
/*
* Copy argv[] so that we can pass the arguments in the original
* sequence when resetting the sandbox.
@@ -452,7 +455,7 @@ int main(int argc, char *argv[])
memset(&data, '\0', sizeof(data));
gd = &data;
- gd->arch.text_base = os_find_text_base();
+ gd->arch.text_base = text_base;
ret = state_init();
if (ret)