binfmt: Fix offset value when calling elf_read() in elf_symname()

Jira: PDFW15IS-1650
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Yasuhiro Osaki 2015-02-24 15:58:12 +09:00 committed by Masayuki Ishikawa
parent a84ee7e8b7
commit dd2efb909a
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ static int elf_symname(FAR struct elf_loadinfo_s *loadinfo,
/* Read that number of bytes into the array */ /* Read that number of bytes into the array */
buffer = &loadinfo->iobuffer[bytesread]; buffer = &loadinfo->iobuffer[bytesread];
ret = elf_read(loadinfo, buffer, readlen, offset); ret = elf_read(loadinfo, buffer, readlen, offset + bytesread);
if (ret < 0) if (ret < 0)
{ {
berr("elf_read failed: %d\n", ret); berr("elf_read failed: %d\n", ret);