diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-11 10:31:12 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-11 10:31:12 -0600 |
commit | 36412153e7ed4b60daeb8aa55ac425a844f24c9d (patch) | |
tree | 5289ee50a0a67cd7ef52a92c9f1cd706db522d6d /nuttx/binfmt | |
parent | fafcfe26d6b190a9f6a58a354d5975a3540ff4a8 (diff) | |
download | nuttx-36412153e7ed4b60daeb8aa55ac425a844f24c9d.tar.gz nuttx-36412153e7ed4b60daeb8aa55ac425a844f24c9d.tar.bz2 nuttx-36412153e7ed4b60daeb8aa55ac425a844f24c9d.zip |
Misc fixes to repair some of the breakage to the SAMA5D4-EK elf configuration caused by changes for the knsh configuration
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/binfmt_execmodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c index b9a1dde79..baed131bf 100644 --- a/nuttx/binfmt/binfmt_execmodule.c +++ b/nuttx/binfmt/binfmt_execmodule.c @@ -136,7 +136,7 @@ static void exec_ctors(FAR void *arg) int exec_module(FAR const struct binary_s *binp) { FAR struct task_tcb_s *tcb; -#ifdef CONFIG_ARCH_ADDRENV +#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL) save_addrenv_t oldenv; #endif FAR uint32_t *stack; @@ -165,7 +165,7 @@ int exec_module(FAR const struct binary_s *binp) goto errout; } -#ifdef CONFIG_ARCH_ADDRENV +#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL) /* Instantiate the address environment containing the user heap */ ret = up_addrenv_select(&binp->addrenv, &oldenv); @@ -260,7 +260,7 @@ int exec_module(FAR const struct binary_s *binp) goto errout_with_stack; } -#ifdef CONFIG_ARCH_ADDRENV +#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL) /* Restore the address environment of the caller */ ret = up_addrenv_restore(&oldenv); @@ -281,10 +281,10 @@ errout_with_stack: goto errout; errout_with_addrenv: -#ifdef CONFIG_ARCH_ADDRENV +#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL) (void)up_addrenv_restore(&oldenv); -#endif errout_with_tcb: +#endif kmm_free(tcb); errout: set_errno(err); |