Finishes basic coding of ELF file support

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5259 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-10-25 19:21:47 +00:00
parent 86618a177b
commit 87e9dbc4c8
9 changed files with 493 additions and 11 deletions
+11 -1
View File
@@ -327,6 +327,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo)
ret = elf_filelen(loadinfo);
{
bdbg("elf_filelen failed: %d\n", ret);
return ret;
}
@@ -335,6 +336,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo)
ret = elf_loadshdrs(loadinfo);
if (ret < 0)
{
bdbg("elf_loadshdrs failed: %d\n", ret);
return ret;
}
@@ -347,11 +349,19 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo)
ret = elf_loadfile(loadinfo);
if (ret < 0)
{
bdbg("elf_loadfile failed: %d\n", ret);
goto errout_with_shdrs;
}
/* Find static constructors. */
#warning "Missing logic"
#ifdef CONFIG_ELF_CONSTRUCTORS
ret = elf_findctors(loadinfo);
{
bdbg("elf_findctors failed: %d\n", ret);
goto errout_with_shdrs;
}
#endif
return OK;