Fix coding style issues from PR #7202

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Alan Carvalho de Assis
2023-07-06 11:02:39 -03:00
committed by Tiago Medicci Serrano
parent 8f38fa6062
commit bc62699c1d
3 changed files with 31 additions and 28 deletions
+2 -1
View File
@@ -207,6 +207,7 @@ static inline FAR void *dlinsert(FAR const char *filename)
binfo("Failed to initialize for load of ELF program: %d\n", ret);
goto errout_with_loadinfo;
}
memset(modp, 0, sizeof(*modp));
/* Load the program binary */
@@ -248,7 +249,7 @@ static inline FAR void *dlinsert(FAR const char *filename)
/* Call the module initializer */
if (loadinfo.ehdr.e_type == ET_REL)
if (loadinfo.ehdr.e_type == ET_REL)
{
ret = initializer(&modp->modinfo);
if (ret < 0)
+4 -2
View File
@@ -496,8 +496,10 @@ int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr)
case R_ARM_RELATIVE :
case R_ARM_JUMP_SLOT :
{
binfo("Relocating: RELATIVE/JUMP_SLOT at %p value: %08lx with %08lx\n",
(void *)addr,*(unsigned long *) addr, (unsigned long) sym->st_value);
binfo("Relocating: RELATIVE/JUMP_SLOT at %p value: %08lx"
"with %08lx\n",
(void *)addr, *(unsigned long *)addr,
(unsigned long)sym->st_value);
*(uint32_t *) addr = (uint32_t) sym->st_value;
}
break;
+25 -25
View File
@@ -111,30 +111,30 @@ int modlib_readsym(FAR struct mod_loadinfo_s *loadinfo, int index,
int modlib_symvalue(FAR struct module_s *modp,
FAR struct mod_loadinfo_s *loadinfo, FAR Elf_Sym *sym,
Elf_Off offset);
Elf_Off offset);
/****************************************************************************
* Name: modlib_insertsymtab
*
* Description:
* Insert a symbol table for the current module.
*
* Input Parameters:
* modp - Module state information
* loadinfo - Module load information
* shdr - Symbol table section header
* sym - Symbol table entry
*
* Returned Value:
* 0 (OK) is returned on success and a negated errno is returned on
* failure.
*
* ENOMEM - Symbol undefined and not provided via a symbol table
*
****************************************************************************/
int modlib_insertsymtab(FAR struct module_s *modp,
FAR struct mod_loadinfo_s *loadinfo,
/****************************************************************************
* Name: modlib_insertsymtab
*
* Description:
* Insert a symbol table for the current module.
*
* Input Parameters:
* modp - Module state information
* loadinfo - Module load information
* shdr - Symbol table section header
* sym - Symbol table entry
*
* Returned Value:
* 0 (OK) is returned on success and a negated errno is returned on
* failure.
*
* ENOMEM - Symbol undefined and not provided via a symbol table
*
****************************************************************************/
int modlib_insertsymtab(FAR struct module_s *modp,
FAR struct mod_loadinfo_s *loadinfo,
FAR Elf_Shdr *shdr,
FAR Elf_Sym *sym);
@@ -158,8 +158,8 @@ int modlib_insertsymtab(FAR struct module_s *modp,
*
****************************************************************************/
void *modlib_findglobal(FAR struct module_s *modp,
FAR struct mod_loadinfo_s *loadinfo,
void *modlib_findglobal(FAR struct module_s *modp,
FAR struct mod_loadinfo_s *loadinfo,
FAR Elf_Shdr *shdr,
FAR Elf_Sym *sym);