summaryrefslogtreecommitdiff
path: root/src/core/loader
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader')
-rw-r--r--src/core/loader/elf.cpp4
-rw-r--r--src/core/loader/ncch.cpp6
-rw-r--r--src/core/loader/ncch.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp
index 389d5a8c9..63d2496ed 100644
--- a/src/core/loader/elf.cpp
+++ b/src/core/loader/elf.cpp
@@ -273,13 +273,13 @@ bool ElfReader::LoadInto(u32 vaddr) {
273 273
274 for (int i = 0; i < header->e_phnum; i++) { 274 for (int i = 0; i < header->e_phnum; i++) {
275 Elf32_Phdr *p = segments + i; 275 Elf32_Phdr *p = segments + i;
276 INFO_LOG(MASTER_LOG, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr, 276 INFO_LOG(MASTER_LOG, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr,
277 p->p_filesz, p->p_memsz); 277 p->p_filesz, p->p_memsz);
278 278
279 if (p->p_type == PT_LOAD) { 279 if (p->p_type == PT_LOAD) {
280 segment_addr[i] = base_addr + p->p_vaddr; 280 segment_addr[i] = base_addr + p->p_vaddr;
281 memcpy(Memory::GetPointer(segment_addr[i]), GetSegmentPtr(i), p->p_filesz); 281 memcpy(Memory::GetPointer(segment_addr[i]), GetSegmentPtr(i), p->p_filesz);
282 INFO_LOG(MASTER_LOG, "Loadable Segment Copied to %08x, size %08x", segment_addr[i], 282 INFO_LOG(MASTER_LOG, "Loadable Segment Copied to %08x, size %08x", segment_addr[i],
283 p->p_memsz); 283 p->p_memsz);
284 } 284 }
285 } 285 }
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp
index 5b6f88604..343bb7523 100644
--- a/src/core/loader/ncch.cpp
+++ b/src/core/loader/ncch.cpp
@@ -118,7 +118,7 @@ AppLoader_NCCH::~AppLoader_NCCH() {
118 * @return ResultStatus result of function 118 * @return ResultStatus result of function
119 */ 119 */
120ResultStatus AppLoader_NCCH::LoadExec() const { 120ResultStatus AppLoader_NCCH::LoadExec() const {
121 if (!is_loaded) 121 if (!is_loaded)
122 return ResultStatus::ErrorNotLoaded; 122 return ResultStatus::ErrorNotLoaded;
123 123
124 std::vector<u8> code; 124 std::vector<u8> code;
@@ -185,7 +185,7 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>&
185 return ResultStatus::Error; 185 return ResultStatus::Error;
186 } 186 }
187 return ResultStatus::ErrorNotUsed; 187 return ResultStatus::ErrorNotUsed;
188} 188}
189 189
190/** 190/**
191 * Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) 191 * Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI)
@@ -210,7 +210,7 @@ ResultStatus AppLoader_NCCH::Load() {
210 file.Seek(ncch_offset, 0); 210 file.Seek(ncch_offset, 0);
211 file.ReadBytes(&ncch_header, sizeof(NCCH_Header)); 211 file.ReadBytes(&ncch_header, sizeof(NCCH_Header));
212 } 212 }
213 213
214 // Verify we are loading the correct file type... 214 // Verify we are loading the correct file type...
215 if (0 != memcmp(&ncch_header.magic, "NCCH", 4)) 215 if (0 != memcmp(&ncch_header.magic, "NCCH", 4))
216 return ResultStatus::ErrorInvalidFormat; 216 return ResultStatus::ErrorInvalidFormat;
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h
index f40a258b7..03116add8 100644
--- a/src/core/loader/ncch.h
+++ b/src/core/loader/ncch.h
@@ -215,7 +215,7 @@ private:
215 u32 entry_point; 215 u32 entry_point;
216 u32 ncch_offset; // Offset to NCCH header, can be 0 or after NCSD header 216 u32 ncch_offset; // Offset to NCCH header, can be 0 or after NCSD header
217 u32 exefs_offset; 217 u32 exefs_offset;
218 218
219 NCCH_Header ncch_header; 219 NCCH_Header ncch_header;
220 ExeFs_Header exefs_header; 220 ExeFs_Header exefs_header;
221 ExHeader_Header exheader_header; 221 ExHeader_Header exheader_header;