summaryrefslogtreecommitdiff
path: root/src/module.c
diff options
context:
space:
mode:
author孙冬梅 <[email protected]>2018-03-10 18:33:45 +0800
committerGitHub <[email protected]>2018-03-10 18:33:45 +0800
commit6e987b2350badd1777454b7324fc88d3275407d6 (patch)
tree1bbd5fc2cdaff0719d76122c91e0e736bf3f8116 /src/module.c
parent351f15be4bdf575789be2e1d74934e830bd60554 (diff)
parent5534bab89ee767757a451b2efeb5341c1fb74872 (diff)
Merge pull request #2 from RT-Thread/master
update form origin
Diffstat (limited to 'src/module.c')
-rw-r--r--src/module.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c
index 2c5cec1b01..b9801558dc 100644
--- a/src/module.c
+++ b/src/module.c
@@ -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)
{