From 9e45144d3ad1420908cfdf84306c76f637829023 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 29 Oct 2012 19:32:05 +0000 Subject: C++ constructors work with ELF load now git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5273 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/binfmt/nxflat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'nuttx/binfmt/nxflat.c') diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c index 8d0ecfdcd..5973a96a9 100644 --- a/nuttx/binfmt/nxflat.c +++ b/nuttx/binfmt/nxflat.c @@ -181,16 +181,18 @@ static int nxflat_loadbinary(struct binary_s *binp) goto errout_with_load; } - /* Return the load information */ + /* Return the load information. By convention, D-space address + * space is stored as the first allocated memory. + */ binp->entrypt = (main_t)(loadinfo.ispace + loadinfo.entryoffs); - binp->ispace = (void*)loadinfo.ispace; - binp->dspace = (void*)loadinfo.dspace; - binp->isize = loadinfo.isize; + binp->mapped = (void*)loadinfo.ispace; + binp->alloc[0] = (void*)loadinfo.dspace; + binp->mapsize = loadinfo.isize; binp->stacksize = loadinfo.stacksize; nxflat_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt, - MIN(binp->isize - loadinfo.entryoffs,512)); + MIN(loadinfo.isize - loadinfo.entryoffs, 512)); nxflat_uninit(&loadinfo); return OK; -- cgit v1.2.3