diff options
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/libelf/libelf_bind.c | 5 | ||||
-rw-r--r-- | nuttx/binfmt/libelf/libelf_init.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/binfmt/libelf/libelf_bind.c b/nuttx/binfmt/libelf/libelf_bind.c index f41b5a0b6..54ea8f1f0 100644 --- a/nuttx/binfmt/libelf/libelf_bind.c +++ b/nuttx/binfmt/libelf/libelf_bind.c @@ -142,7 +142,10 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, int ret; int i; - /* Examine each relocation in the section */ + /* Examine each relocation in the section. 'relsec' is the section + * containing the relations. 'dstsec' is the section containing the data + * to be relocated. + */ for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rel); i++) { diff --git a/nuttx/binfmt/libelf/libelf_init.c b/nuttx/binfmt/libelf/libelf_init.c index e1b9f73d6..fa4b7983c 100644 --- a/nuttx/binfmt/libelf/libelf_init.c +++ b/nuttx/binfmt/libelf/libelf_init.c @@ -154,6 +154,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo) /* Get the length of the file. */ ret = elf_filelen(loadinfo, filename); + if (ret < 0) { bdbg("elf_filelen failed: %d\n", ret); return ret; |