MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / GetTextRange

Method GetTextRange

pcsx2/Elfheader.cpp:216–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216std::pair<u32,u32> ElfObject::GetTextRange() const
217{
218 if (!isPSXElf && HasProgramHeaders())
219 {
220 const ELF_HEADER& header = GetHeader();
221 for (int i = 0; i < header.e_phnum; i++)
222 {
223 const u32 start = proghead[i].p_vaddr;
224 const u32 size = proghead[i].p_memsz;
225
226 if (start <= header.e_entry && (start + size) > header.e_entry)
227 return std::make_pair(start, size);
228 }
229 }
230
231 return std::make_pair(0,0);
232}
233
234bool ElfObject::CheckElfSize(s64 size, Error* error)
235{

Callers 1

UpdateELFInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected