Merge pull request #1215 from parai/patch-1

Fix issue when loading *.o when do internal function call
This commit is contained in:
Bernard Xiong 2018-02-12 16:39:05 +08:00 committed by GitHub
commit a692cc1549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -823,6 +823,15 @@ static struct rt_module* _load_relocated_object(const char *name,
(Elf32_Addr)data_addr + sym->st_value);
}
}
else if (ELF_ST_TYPE(sym->st_info) == STT_FUNC)
{
/* relocate function */
rt_module_arm_relocate(module, rel,
(Elf32_Addr)((rt_uint8_t *)
module->module_space
- module_addr
+ sym->st_value));
}
}
else if (ELF_ST_TYPE(sym->st_info) == STT_FUNC)
{