MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / isValidElf

Function isValidElf

source/kernel/loader/loader.cpp:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38#endif
39
40bool isValidElf(struct k_Elf32_Ehdr* hdr) {
41 if (hdr->e_ident[0] != 0x7F || hdr->e_ident[1] != 'E' || hdr->e_ident[2] != 'L' || hdr->e_ident[3] != 'F') {
42 return false;
43 }
44 if (hdr->e_ident[4] != 1) {
45 return false;
46 }
47 if (hdr->e_ident[5] != 1) {
48 return false;
49 }
50 return true;
51}
52
53BString ElfLoader::getInterpreter(FsOpenNode* openNode, bool* isElf) {
54 U8 buffer[sizeof(struct k_Elf32_Ehdr)] = { 0 };

Callers 3

getInterpreterMethod · 0.85
getMemSizeOfElfMethod · 0.85
loadProgramMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected