fix dynamic loading error, close #3740.

This commit is contained in:
zhengxiaojun
2024-05-03 18:03:13 +08:00
parent 00f0d307b4
commit 4655ceee4d

View File

@@ -177,7 +177,7 @@ rtems_rtl_elf_find_symbol (rtems_rtl_obj* obj,
rtems_rtl_obj_sect* sect;
/*
* If the symbol type is STT_NOTYPE the symbol references a global
* If the symbol bind is STB_GLOBAL the symbol references a global
* symbol. The global symbol table is searched to find it and that value
* returned. If the symbol is local to the object module the section for the
* symbol is located and it's base added to the symbol's value giving an
@@ -188,7 +188,7 @@ rtems_rtl_elf_find_symbol (rtems_rtl_obj* obj,
* linker for the base image and by the TLS allocator for loaded
* modules. There is no section and no absolute base.
*/
if (ELF_ST_TYPE (sym->st_info) == STT_NOTYPE ||
if (ELF_ST_BIND (sym->st_info) == STB_GLOBAL ||
sym->st_shndx == SHN_COMMON ||
ELF_ST_TYPE (sym->st_info) == STT_TLS)
{