MCPcopy Create free account
hub / github.com/cinit/TMoe / getSegmentInfoFromFileMemMap32

Function getSegmentInfoFromFileMemMap32

app/src/main/cpp/utils/elfsym/ElfView.cpp:387–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385
386template<class T>
387[[nodiscard]]
388static bool getSegmentInfoFromFileMemMap32(const ElfView::ElfInfo &info, Elf32_Word type,
389 const Elf32_Phdr **ppPhdr, Elf32_Word *pSize, T *data) {
390 auto *_phdr = findSegmentByType32(info, type);
391 if (_phdr) {
392 *ppPhdr = _phdr;
393 *data = reinterpret_cast<T>((info.handle) + _phdr->p_offset);
394 *pSize = _phdr->p_filesz;
395 return true;
396 } else {
397 *ppPhdr = nullptr;
398 *pSize = 0;
399 return false;
400 }
401}
402
403template<class T>
404[[nodiscard]]

Callers 1

getElfInfoMethod · 0.85

Calls 1

findSegmentByType32Function · 0.85

Tested by

no test coverage detected