From 33ea53094cc1f34c27ca295472f01f8dd09a300b Mon Sep 17 00:00:00 2001
From: bunnei <bunneidev@gmail.com>
Date: Thu, 5 Oct 2017 23:30:08 -0400
Subject: loader: Add support for NRO, as well as various fixes and shared
 linker.

---
 src/core/loader/loader.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/core/loader/loader.cpp')

diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index d309e7c9ef..d96b9f1f06 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -10,6 +10,7 @@
 #include "core/loader/3dsx.h"
 #include "core/loader/elf.h"
 #include "core/loader/ncch.h"
+#include "core/loader/nro.h"
 #include "core/loader/nso.h"
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -34,6 +35,7 @@ FileType IdentifyFile(FileUtil::IOFile& file) {
     CHECK_TYPE(ELF)
     CHECK_TYPE(NCCH)
     CHECK_TYPE(NSO)
+    CHECK_TYPE(NRO)
 
 #undef CHECK_TYPE
 
@@ -121,6 +123,10 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileTyp
     case FileType::NSO:
         return std::make_unique<AppLoader_NSO>(std::move(file), filename, filepath);
 
+    // NX NRO file format.
+    case FileType::NRO:
+        return std::make_unique<AppLoader_NRO>(std::move(file), filename, filepath);
+
     default:
         return nullptr;
     }
-- 
cgit v1.2.3-70-g09d2