summaryrefslogtreecommitdiff
path: root/src/module.c
diff options
context:
space:
mode:
authorqiuyiuestc <[email protected]>2010-05-29 15:27:27 +0000
committerqiuyiuestc <[email protected]>2010-05-29 15:27:27 +0000
commit25e7ea1745a02f3673f025ca209d10e248b45e6b (patch)
treef3ed8551c2c26140e15e4f0b3e0d57f337e6153e /src/module.c
parent0c5f6cd9b06c93dc128a696f641f757c66425826 (diff)
module developing, application can be run successfully
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@747 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/module.c')
-rw-r--r--src/module.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/module.c b/src/module.c
index decd8e6222..e624c40d3f 100644
--- a/src/module.c
+++ b/src/module.c
@@ -19,7 +19,7 @@
#include "module.h"
#include "kservice.h"
-#define RT_MODULE_DEBUG
+/* #define RT_MODULE_DEBUG */
#ifdef RT_USING_MODULE
#define elf_module ((Elf32_Ehdr *)module_ptr)
@@ -262,7 +262,7 @@ struct rt_module* rt_module_load(void* module_ptr, const rt_uint8_t* name)
if (IS_PROG(shdr[index]) && IS_AW(shdr[index]))
{
data_addr = (rt_uint32_t)ptr;
- rt_kprintf("data section address 0x%x\n", data_addr);
+ /* rt_kprintf("data section address 0x%x\n", data_addr); */
rt_memcpy(ptr, (rt_uint8_t*)elf_module + shdr[index].sh_offset, shdr[index].sh_size);
ptr += shdr[index].sh_size;
}
@@ -271,7 +271,7 @@ struct rt_module* rt_module_load(void* module_ptr, const rt_uint8_t* name)
if (IS_NOPROG(shdr[index]) && IS_AW(shdr[index]))
{
bss_addr = (rt_uint32_t)ptr;
- rt_kprintf("bss section address 0x%x\n", bss_addr);
+ /* rt_kprintf("bss section address 0x%x\n", bss_addr); */
rt_memset(ptr, 0, shdr[index].sh_size);
}
}
@@ -309,7 +309,6 @@ struct rt_module* rt_module_load(void* module_ptr, const rt_uint8_t* name)
if((ELF_ST_TYPE(sym->st_info) == STT_SECTION)
|| (ELF_ST_TYPE(sym->st_info) == STT_OBJECT))
{
- rt_kprintf("section name %s\n", shstrab + shdr[sym->st_shndx].sh_name);
if (rt_strncmp(shstrab + shdr[sym->st_shndx].sh_name, ELF_RODATA, 8) == 0)
{
/* relocate rodata section */
@@ -387,7 +386,7 @@ void rt_module_run(struct rt_module* module)
{
/* application */
module->module_thread = rt_thread_create(module->parent.name,
- module->module_entry, RT_NULL,
+ module->module_info->exec_entry, RT_NULL,
512, 90, 10);
module->module_thread->module_parent = module;
rt_thread_startup(module->module_thread);