http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-DES
| 2664 | |
| 2665 | // http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-DES |
| 2666 | bool ElfView::DerefPpc64Descriptor(BinaryReader& reader, uint64_t addr, uint64_t& result) |
| 2667 | { |
| 2668 | /* must be 64-bit ELF, arch PPC64 */ |
| 2669 | if (m_elf32 || m_commonHeader.arch != EM_PPC64) |
| 2670 | return false; |
| 2671 | |
| 2672 | /* .opd section must exist */ |
| 2673 | if (!m_sectionOpd.size) |
| 2674 | return false; |
| 2675 | |
| 2676 | /* addr must be within .opd section */ |
| 2677 | if (addr < m_sectionOpd.address || addr >= m_sectionOpd.address + m_sectionOpd.size) |
| 2678 | return false; |
| 2679 | |
| 2680 | /* dereference descriptor to get function entry */ |
| 2681 | uint64_t saved = reader.GetOffset(); |
| 2682 | reader.Seek(m_sectionOpd.offset + (addr - m_sectionOpd.address)); |
| 2683 | bool read_success = reader.TryRead64(result);; |
| 2684 | reader.Seek(saved); |
| 2685 | return read_success; |
| 2686 | } |
| 2687 | |
| 2688 | |
| 2689 | void ElfView::ParseMiniDebugInfo() |