未验证 提交 74622c6e 编写于 作者: P parai 提交者: GitHub

Fix issue when loading *.o when do internal function call

Fox example for the below example code:

#include <stdio.h>

void goodBye(void)
{
	printf("Good Bye!\n");
}

int main(int argc, char* argv[])
{
	printf("Hello World!\n");
	goodBye();
	return 0;
}
上级 84a44e58
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册