From 90c3c302a9106d87793af0c02b7626e1df8db157 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 26 Jun 2009 13:43:32 +0000 Subject: function pointers in modules must have global scope git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1960 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/binfmt/libnxflat/libnxflat_bind.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'nuttx/binfmt/libnxflat/libnxflat_bind.c') diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c index 4e89a76ec..32442467a 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_bind.c +++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c @@ -235,6 +235,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) offset = ntohl(hdr->h_relocstart); nrelocs = ntohs(hdr->h_reloccount); + bvdbg("offset: %08lx nrelocs: %d\n", (long)offset, nrelocs); /* The value of the relocation list that we get from the header is a * file offset. We will have to convert this to an offset into the @@ -243,9 +244,13 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) */ DEBUGASSERT(offset >= loadinfo->isize); - DEBUGASSERT(offset + nrelocs * sizeof(struct nxflat_reloc_s) <= (loadinfo->isize + loadinfo->dsize)); + DEBUGASSERT(offset + nrelocs * sizeof(struct nxflat_reloc_s) + <= (loadinfo->isize + loadinfo->dsize)); - relocs = (FAR struct nxflat_reloc_s*)(offset - loadinfo->isize + loadinfo->dspace->region); + relocs = (FAR struct nxflat_reloc_s*) + (offset - loadinfo->isize + loadinfo->dspace->region); + bvdbg("isize: %08lx dpsace: %p relocs: %p\n", + (long)loadinfo->isize, loadinfo->dspace->region, relocs); /* Now, traverse the relocation list of and bind each GOT relocation. */ -- cgit v1.2.3