elf.h 872 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <string>
  6. #include "common/common_types.h"
  7. #include "core/loader/loader.h"
  8. namespace Core {
  9. class System;
  10. }
  11. namespace Loader {
  12. /// Loads an ELF/AXF file
  13. class AppLoader_ELF final : public AppLoader {
  14. public:
  15. explicit AppLoader_ELF(FileSys::VirtualFile file);
  16. /**
  17. * Returns the type of the file
  18. * @param file open file
  19. * @return FileType found, or FileType::Error if this loader doesn't know it
  20. */
  21. static FileType IdentifyType(const FileSys::VirtualFile& file);
  22. FileType GetFileType() const override {
  23. return IdentifyType(file);
  24. }
  25. LoadResult Load(Kernel::Process& process, Core::System& system) override;
  26. };
  27. } // namespace Loader