mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 10:32:47 +08:00
Fix modlib to get binary loading working again
This patch fixes the issue reported here: https://github.com/apache/nuttx/issues/9845
This commit is contained in:
committed by
Xiang Xiao
parent
60200b6c9b
commit
ed4f651bbd
@@ -263,8 +263,8 @@ static int modlib_relocate(FAR struct module_s *modp,
|
||||
|
||||
/* Read the symbol table entry into memory */
|
||||
|
||||
ret = modlib_symvalue(modp, loadinfo, sym,
|
||||
loadinfo->shdr[loadinfo->strtabidx].sh_offset);
|
||||
ret = modlib_readsym(loadinfo, symidx, sym,
|
||||
&loadinfo->shdr[loadinfo->symtabidx]);
|
||||
if (ret < 0)
|
||||
{
|
||||
berr("ERROR: Section %d reloc %d: "
|
||||
@@ -862,7 +862,7 @@ int modlib_bind(FAR struct module_s *modp,
|
||||
* sections that were not loaded into memory.
|
||||
*/
|
||||
|
||||
if ((loadinfo->shdr[i].sh_flags & SHF_ALLOC) == 0)
|
||||
if ((loadinfo->shdr[infosec].sh_flags & SHF_ALLOC) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user