| 17 | static auto LOGGER = Logger("ElfApp"); |
| 18 | |
| 19 | static std::string getErrorCodeString(int error_code) { |
| 20 | switch (error_code) { |
| 21 | case ENOMEM: |
| 22 | return "out of memory"; |
| 23 | case ENOSYS: |
| 24 | return "missing symbol"; |
| 25 | case EINVAL: |
| 26 | return "invalid argument or main() missing"; |
| 27 | default: |
| 28 | return std::format("code {}", error_code); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | class ElfApp final : public App { |
| 33 |