diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-22 23:09:55 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-22 23:09:55 +0000 |
commit | 8ef1642bb0dd937623084d137f30f904db85209e (patch) | |
tree | 2c375c22dc239fd6e94bf743d79db72e2107290a /nuttx/binfmt | |
parent | b5caf439b4c7ff9bbeddf87e7c19065f81ea730d (diff) | |
download | px4-nuttx-8ef1642bb0dd937623084d137f30f904db85209e.tar.gz px4-nuttx-8ef1642bb0dd937623084d137f30f904db85209e.tar.bz2 px4-nuttx-8ef1642bb0dd937623084d137f30f904db85209e.zip |
ispace offset needs to account for size of header
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1928 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_bind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c index 721e4bdb4..9ed623397 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_bind.c +++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c @@ -87,13 +87,13 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo, uint32 *addr; bvdbg("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n", - offset, loadinfo->ispace); + offset, loadinfo->ispace + sizeof(struct nxflat_hdr_s)); if (offset < loadinfo->dsize) { addr = (uint32*)(offset + loadinfo->dspace->region); bvdbg(" Before: %08x\n", *addr); - *addr += (uint32)(loadinfo->ispace); + *addr += (uint32)(loadinfo->ispace + sizeof(struct nxflat_hdr_s)); bvdbg(" After: %08x\n", *addr); return OK; } @@ -321,7 +321,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, offset = imports[i].i_funcname; DEBUGASSERT(offset < loadinfo->isize); - symname = (char*)(offset + loadinfo->ispace); + symname = (char*)(offset + loadinfo->ispace + sizeof(struct nxflat_hdr_s)); /* Find the exported symbol value for this this symbol name. */ |