================ @@ -873,33 +873,29 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) { if (!section_list) return Address(); - // Find the SHT_DYNAMIC (.dynamic) section. - SectionSP dynsym_section_sp( - section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo, true)); - if (!dynsym_section_sp) - return Address(); - assert(dynsym_section_sp->GetObjectFile() == this); - - user_id_t dynsym_id = dynsym_section_sp->GetID(); - const ELFSectionHeaderInfo *dynsym_hdr = GetSectionHeaderByIndex(dynsym_id); - if (!dynsym_hdr) - return Address(); - for (size_t i = 0; i < m_dynamic_symbols.size(); ++i) { - ELFDynamic &symbol = m_dynamic_symbols[i]; + const ELFDynamic &symbol = m_dynamic_symbols[i].symbol; if (symbol.d_tag == DT_DEBUG) { // Compute the offset as the number of previous entries plus the size of // d_tag. - addr_t offset = i * dynsym_hdr->sh_entsize + GetAddressByteSize(); - return Address(dynsym_section_sp, offset); + addr_t offset = (i * 2 + 1) * GetAddressByteSize(); + addr_t file_addr = m_dynamic_base_addr + offset; + Address addr; ---------------- labath wrote:
Could this be moved outside the if block ? https://github.com/llvm/llvm-project/pull/101237 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits