summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/libc/posix/libdl/dlelf.c10
-rw-r--r--components/libc/posix/libdl/dlmodule.c6
-rw-r--r--components/libc/posix/libdl/dlmodule.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/components/libc/posix/libdl/dlelf.c b/components/libc/posix/libdl/dlelf.c
index 9e8f1c6b2d..4fc89e5aaa 100644
--- a/components/libc/posix/libdl/dlelf.c
+++ b/components/libc/posix/libdl/dlelf.c
@@ -383,9 +383,9 @@ rt_err_t dlmodule_load_relocated_object(struct rt_dlmodule* module, void *module
rt_memcpy(ptr,
(rt_uint8_t *)elf_module + shdr[index].sh_offset,
shdr[index].sh_size);
- rodata_addr = (rt_uint32_t)ptr;
+ rodata_addr = (rt_ubase_t)ptr;
LOG_D("load rodata 0x%x, size %d, rodata 0x%x", ptr,
- shdr[index].sh_size, *(rt_uint32_t *)data_addr);
+ shdr[index].sh_size, *(rt_ubase_t *)rodata_addr);
ptr += shdr[index].sh_size;
}
@@ -395,9 +395,9 @@ rt_err_t dlmodule_load_relocated_object(struct rt_dlmodule* module, void *module
rt_memcpy(ptr,
(rt_uint8_t *)elf_module + shdr[index].sh_offset,
shdr[index].sh_size);
- data_addr = (rt_uint32_t)ptr;
+ data_addr = (rt_ubase_t)ptr;
LOG_D("load data 0x%x, size %d, data 0x%x", ptr,
- shdr[index].sh_size, *(rt_uint32_t *)data_addr);
+ shdr[index].sh_size, *(rt_ubase_t *)data_addr);
ptr += shdr[index].sh_size;
}
@@ -405,7 +405,7 @@ rt_err_t dlmodule_load_relocated_object(struct rt_dlmodule* module, void *module
if (IS_NOPROG(shdr[index]) && IS_AW(shdr[index]))
{
rt_memset(ptr, 0, shdr[index].sh_size);
- bss_addr = (rt_uint32_t)ptr;
+ bss_addr = (rt_ubase_t)ptr;
LOG_D("load bss 0x%x, size %d", ptr, shdr[index].sh_size);
}
}
diff --git a/components/libc/posix/libdl/dlmodule.c b/components/libc/posix/libdl/dlmodule.c
index 17aca0b2da..eee45d0843 100644
--- a/components/libc/posix/libdl/dlmodule.c
+++ b/components/libc/posix/libdl/dlmodule.c
@@ -837,10 +837,10 @@ void dlmodule_exit(int ret_code)
* @brief search for a symbol by its name in the kernel symbol table.
*
* @param sym_str the symbol name string.
- * @return rt_uint32_t On success, it returns the address of the symbol.
+ * @return rt_ubase_t On success, it returns the address of the symbol.
* Otherwise, it returns 0 (indicating the symbol was not found).
*/
-rt_uint32_t dlmodule_symbol_find(const char *sym_str)
+rt_ubase_t dlmodule_symbol_find(const char *sym_str)
{
/* find in kernel symbol table */
struct rt_module_symtab *index;
@@ -848,7 +848,7 @@ rt_uint32_t dlmodule_symbol_find(const char *sym_str)
for (index = _rt_module_symtab_begin; index != _rt_module_symtab_end; index ++)
{
if (rt_strcmp(index->name, sym_str) == 0)
- return (rt_uint32_t)index->addr;
+ return (rt_ubase_t)index->addr;
}
return 0;
diff --git a/components/libc/posix/libdl/dlmodule.h b/components/libc/posix/libdl/dlmodule.h
index 62a0cdd5d3..75ca325800 100644
--- a/components/libc/posix/libdl/dlmodule.h
+++ b/components/libc/posix/libdl/dlmodule.h
@@ -82,6 +82,6 @@ void dlmodule_exit(int ret_code);
struct rt_dlmodule *dlmodule_find(const char *name);
-rt_uint32_t dlmodule_symbol_find(const char *sym_str);
+rt_ubase_t dlmodule_symbol_find(const char *sym_str);
#endif