We are using dll boost project to access shared libraries symbols on Linux EL7 (ELF)
We notice that we symbols with PROTECTED visibility attribute are not listed on library_info symbols.
Protected symbols are exported and can be accessed when loading shared libraries using dlopen/dlsym, so I understand they should be included on symbols list retrieved using library_info.
We try changing is_visible method on dll/detail/elf_info.hpp, and changing the condition to:
return ((sym.st_other & 0x03) == STV_DEFAULT_ || (sym.st_other & 0x03) == STV_PROTECTED_ ) && (sym.st_info >> 4) != STB_LOCAL_ && !!sym.st_size;
and it seems to work.
Dear developers,
We are using dll boost project to access shared libraries symbols on Linux EL7 (ELF) We notice that we symbols with PROTECTED visibility attribute are not listed on library_info symbols. Protected symbols are exported and can be accessed when loading shared libraries using dlopen/dlsym, so I understand they should be included on symbols list retrieved using library_info.
We try changing is_visible method on dll/detail/elf_info.hpp, and changing the condition to:
return ((sym.st_other & 0x03) == STV_DEFAULT_ || (sym.st_other & 0x03) == STV_PROTECTED_ ) && (sym.st_info >> 4) != STB_LOCAL_ && !!sym.st_size;
and it seems to work.Can you please review this? Regards