summaryrefslogtreecommitdiff
path: root/nuttx/binfmt
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-25 22:10:56 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-25 22:10:56 +0000
commitd6b30f6e49779b31617fad8e8daa06470145f909 (patch)
tree7123939c22af75fef3c7ace3aaa486afdaf4b6d7 /nuttx/binfmt
parent5ae419f6845ff28bcbdb339cdfb66f6b2e46f9ab (diff)
downloadpx4-nuttx-d6b30f6e49779b31617fad8e8daa06470145f909.tar.gz
px4-nuttx-d6b30f6e49779b31617fad8e8daa06470145f909.tar.bz2
px4-nuttx-d6b30f6e49779b31617fad8e8daa06470145f909.zip
More ELF loader changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5261 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r--nuttx/binfmt/elf.c10
-rw-r--r--nuttx/binfmt/libelf/Make.defs2
-rw-r--r--nuttx/binfmt/libelf/libelf_load.c2
-rw-r--r--nuttx/binfmt/libnxflat/Make.defs2
-rw-r--r--nuttx/binfmt/nxflat.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/nuttx/binfmt/elf.c b/nuttx/binfmt/elf.c
index ba12a22ea..d9c3d0b9c 100644
--- a/nuttx/binfmt/elf.c
+++ b/nuttx/binfmt/elf.c
@@ -139,11 +139,11 @@ static void elf_dumploadinfo(FAR struct elf_loadinfo_s *loadinfo)
bdbg(" e_shnum: %d\n", loadinfo->ehdr.e_shnum);
bdbg(" e_shstrndx: %d\n", loadinfo->ehdr.e_shstrndx);
- if (loadinfo->shdr && loadinfo->ehdr.e_shum > 0)
+ if (loadinfo->shdr && loadinfo->ehdr.e_shnum > 0)
{
- for (i = 0; i < loadinfo->ehdr.e_shum; i++)
+ for (i = 0; i < loadinfo->ehdr.e_shnum; i++)
{
- FAR ELF32_Shdr *shdr = &loadinfo->shdr[i];
+ FAR Elf32_Shdr *shdr = &loadinfo->shdr[i];
bdbg("Sections %d:\n", i);
bdbg(" sh_name: %08x\n", shdr->sh_name);
bdbg(" sh_type: %08x\n", shdr->sh_type);
@@ -184,7 +184,7 @@ static int elf_loadbinary(struct binary_s *binp)
elf_dumploadinfo(&loadinfo);
if (ret != 0)
{
- bdbg("Failed to initialize for load of NXFLT program: %d\n", ret);
+ bdbg("Failed to initialize for load of ELF program: %d\n", ret);
goto errout;
}
@@ -194,7 +194,7 @@ static int elf_loadbinary(struct binary_s *binp)
elf_dumploadinfo(&loadinfo);
if (ret != 0)
{
- bdbg("Failed to load NXFLT program binary: %d\n", ret);
+ bdbg("Failed to load ELF program binary: %d\n", ret);
goto errout_with_init;
}
diff --git a/nuttx/binfmt/libelf/Make.defs b/nuttx/binfmt/libelf/Make.defs
index 9e06537bd..a70a127f8 100644
--- a/nuttx/binfmt/libelf/Make.defs
+++ b/nuttx/binfmt/libelf/Make.defs
@@ -41,7 +41,7 @@ BINFMT_CSRCS += elf.c
# ELF library
-BINFMT_CSRCS = libelf_init.c libelf_uninit.c libelf_load.c \
+BINFMT_CSRCS += libelf_init.c libelf_uninit.c libelf_load.c \
libelf_unload.c libelf_verify.c libelf_read.c \
libelf_bind.c libelf_symbols.c
diff --git a/nuttx/binfmt/libelf/libelf_load.c b/nuttx/binfmt/libelf/libelf_load.c
index 758f96548..4a1a561c3 100644
--- a/nuttx/binfmt/libelf/libelf_load.c
+++ b/nuttx/binfmt/libelf/libelf_load.c
@@ -283,8 +283,8 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo)
/* Update sh_addr to point to copy in memory */
+ bvdbg("%d. %08x->%08x\n", i, (long)shdr->sh_addr, (long)dest);
shdr->sh_addr = (uintptr_t)dest;
- bvdbg("%d. 0x%lx %s\n", (long)shdr->sh_addr, loadinfo->secstrings + shdr->sh_name);
/* Setup the memory pointer for the next time through the loop */
diff --git a/nuttx/binfmt/libnxflat/Make.defs b/nuttx/binfmt/libnxflat/Make.defs
index 4462e9a02..4f522e52b 100644
--- a/nuttx/binfmt/libnxflat/Make.defs
+++ b/nuttx/binfmt/libnxflat/Make.defs
@@ -41,7 +41,7 @@ BINFMT_CSRCS += nxflat.c
# NXFLAT library
-BINFMT_CSRCS = libnxflat_init.c libnxflat_uninit.c libnxflat_load.c \
+BINFMT_CSRCS += libnxflat_init.c libnxflat_uninit.c libnxflat_load.c \
libnxflat_unload.c libnxflat_verify.c libnxflat_read.c \
libnxflat_bind.c
diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c
index babc51ff9..8d0ecfdcd 100644
--- a/nuttx/binfmt/nxflat.c
+++ b/nuttx/binfmt/nxflat.c
@@ -158,7 +158,7 @@ static int nxflat_loadbinary(struct binary_s *binp)
nxflat_dumploadinfo(&loadinfo);
if (ret != 0)
{
- bdbg("Failed to initialize for load of NXFLT program: %d\n", ret);
+ bdbg("Failed to initialize for load of NXFLAT program: %d\n", ret);
goto errout;
}
@@ -168,7 +168,7 @@ static int nxflat_loadbinary(struct binary_s *binp)
nxflat_dumploadinfo(&loadinfo);
if (ret != 0)
{
- bdbg("Failed to load NXFLT program binary: %d\n", ret);
+ bdbg("Failed to load NXFLAT program binary: %d\n", ret);
goto errout_with_init;
}