summaryrefslogtreecommitdiff
path: root/apps/examples/elf/elf_main.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-27 00:04:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-27 00:04:47 +0000
commit1ba327bd1c3e895675e7ab504af1064635fdf282 (patch)
tree615048fb87a55a2421efe353d061d0ded0d8eebf /apps/examples/elf/elf_main.c
parentf1c2ce14060e4442dd59f6fa89e02b23c2d3989d (diff)
downloadnuttx-1ba327bd1c3e895675e7ab504af1064635fdf282.tar.gz
nuttx-1ba327bd1c3e895675e7ab504af1064635fdf282.tar.bz2
nuttx-1ba327bd1c3e895675e7ab504af1064635fdf282.zip
The ELF loader is basically functional (needs more testing)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5265 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/elf/elf_main.c')
-rw-r--r--apps/examples/elf/elf_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/examples/elf/elf_main.c b/apps/examples/elf/elf_main.c
index 3a6eae9d9..23a6b2d21 100644
--- a/apps/examples/elf/elf_main.c
+++ b/apps/examples/elf/elf_main.c
@@ -52,10 +52,10 @@
#include <nuttx/ramdisk.h>
#include <nuttx/binfmt/binfmt.h>
#include <nuttx/binfmt/elf.h>
+#include <nuttx/binfmt/symtab.h>
#include "tests/romfs.h"
#include "tests/dirlist.h"
-#include "tests/symtab.h"
/****************************************************************************
* Definitions
@@ -135,6 +135,13 @@ static const char delimiter[] =
static char path[128];
/****************************************************************************
+ * Symbols from Auto-Generated Code
+ ****************************************************************************/
+
+extern const struct symtab_s exports[];
+extern const int nexports;
+
+/****************************************************************************
* Private Functions
****************************************************************************/
@@ -207,7 +214,7 @@ int elf_main(int argc, char *argv[])
bin.filename = path;
bin.exports = exports;
- bin.nexports = NEXPORTS;
+ bin.nexports = nexports;
ret = load_module(&bin);
if (ret < 0)