MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / MapFlags

Method MapFlags

Source/Tools/FEXLoader/ELFCodeLoader.h:106–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 int MapFlags(const Elf64_Phdr& Header) {
107 int rv = 0;
108
109 if (Header.p_flags & PF_R) {
110 rv |= PROT_READ;
111 }
112
113 if (Header.p_flags & PF_W) {
114 rv |= PROT_WRITE;
115 }
116
117 if (Header.p_flags & PF_X) {
118 rv |= PROT_EXEC;
119 }
120
121 return rv;
122 }
123
124 std::optional<uintptr_t> LoadElfFile(ELFParser& Elf, uintptr_t* BrkBase, FEX::HLE::SyscallHandler* const Handler, uint64_t LoadHint = 0) {
125

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected