diff --git a/apps/examples/elf/elf_main.c b/apps/examples/elf/elf_main.c index 66a47592c8..2b5c0eb5eb 100644 --- a/apps/examples/elf/elf_main.c +++ b/apps/examples/elf/elf_main.c @@ -321,7 +321,7 @@ int elf_main(int argc, char *argv[]) /* Execute the ELF module */ - ret = exec_module(&bin, 50); + ret = exec_module(&bin); mm_update(&g_mmstep, "after exec_module"); diff --git a/apps/examples/nxflat/nxflat_main.c b/apps/examples/nxflat/nxflat_main.c index 536bc1dd82..0c4846a5cc 100644 --- a/apps/examples/nxflat/nxflat_main.c +++ b/apps/examples/nxflat/nxflat_main.c @@ -243,7 +243,7 @@ int nxflat_main(int argc, char *argv[]) /* Execute the ELF module */ - ret = exec_module(&bin, 50); + ret = exec_module(&bin); if (ret < 0) { err("ERROR: Failed to execute program '%s'\n", dirlist[i]); diff --git a/nuttx/Documentation/NuttXBinfmt.html b/nuttx/Documentation/NuttXBinfmt.html index 9c9fd3a510..7528b188bc 100644 --- a/nuttx/Documentation/NuttXBinfmt.html +++ b/nuttx/Documentation/NuttXBinfmt.html @@ -8,7 +8,7 @@

NuttX Binary Loader

-

Last Updated: December 17, 2012

+

Last Updated: January 16, 2013

@@ -141,7 +141,7 @@ struct binary_s { /* Information provided to the loader to load and bind a module */ - FAR const char *filename; /* Full path to the binary to be loaded1 */ + FAR const char *filename; /* Full path to the binary to be loaded */ FAR const char **argv; /* Argument list */ FAR const struct symtab_s *exports; /* Table of exported symbols */ int nexports; /* The number of symbols in exports[] */ @@ -153,13 +153,33 @@ struct binary_s main_t entrypt; /* Entry point into a program module */ FAR void *mapped; /* Memory-mapped, address space */ FAR void *alloc[BINFMT_NALLOC]; /* Allocated address spaces */ + + /* Constructors/destructors */ + #ifdef CONFIG_BINFMT_CONSTRUCTORS FAR binfmt_ctor_t *ctors; /* Pointer to a list of constructors */ FAR binfmt_dtor_t *dtors; /* Pointer to a list of destructors */ uint16_t nctors; /* Number of constructors in the list */ uint16_t ndtors; /* Number of destructors in the list */ #endif + + /* Address environment. + * + * addrenv - This is the handle created by up_addrenv_create() that can be + * used to manage the tasks address space. + */ + +#ifdef CONFIG_ADDRENV + task_addrenv_t addrenv; /* Task address environment */ +#endif + size_t mapsize; /* Size of the mapped address region (needed for munmap) */ + + /* Start-up information that is provided by the loader, but may be modified + * by the caller between load_module() and exec_module() calls. + */ + + uint8_t priority; /* Task execution priority */ size_t stacksize; /* Size of the stack in bytes (unallocated) */ }; @@ -291,7 +311,7 @@ This is a NuttX internal function so it follows the convention that 0 (OK<

Function Prototype:

Description:

-

int exec_module(FAR const struct binary_s *bin, int priority) +

int exec_module(FAR const struct binary_s *bin)