diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-13 12:07:40 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-13 12:07:40 -0600 |
commit | 0722a39b7423738eb2f49218c51036eb93b70016 (patch) | |
tree | 330f9a2829b666c63a08725b5a2fdd02aedd4711 /nuttx/binfmt | |
parent | c0c24d3c033ebf1f1808a4894f81134448e14048 (diff) | |
download | nuttx-0722a39b7423738eb2f49218c51036eb93b70016.tar.gz nuttx-0722a39b7423738eb2f49218c51036eb93b70016.tar.bz2 nuttx-0722a39b7423738eb2f49218c51036eb93b70016.zip |
Fix a compile problem noted by Marco Cruz
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/libelf/libelf_load.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/binfmt/libelf/libelf_load.c b/nuttx/binfmt/libelf/libelf_load.c index 11d054a94..95d46999a 100644 --- a/nuttx/binfmt/libelf/libelf_load.c +++ b/nuttx/binfmt/libelf/libelf_load.c @@ -263,9 +263,13 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) elf_elfsize(loadinfo); - /* Determine the heapsize to allocate */ + /* Determine the heapsize to allocate. heapsize is ignored if there is + * no address environment. + */ -#ifdef CONFIG_ARCH_STACK_DYNAMIC +#if !defined(CONFIG_ARCH_ADDRENV) + heapsize = 0; +#elif defined(CONFIG_ARCH_STACK_DYNAMIC) heapsize = ARCH_HEAP_SIZE; #else heapsize = MIN(ARCH_HEAP_SIZE, CONFIG_ELF_STACKSIZE); |