Browse Source
[loader] log error messages when failing to load
remotes/1785372757367212240/tmp_refs/heads/variable-page-size
Exverge
1 month ago
No known key found for this signature in database
GPG Key ID: DAD399BCC5FB77E4
3 changed files with
6 additions and
5 deletions
-
src/core/loader/deconstructed_rom_directory.cpp
-
src/core/loader/kip.cpp
-
src/core/loader/nro.cpp
|
|
|
@ -235,7 +235,8 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect |
|
|
|
? ::Settings::values.rng_seed.GetValue() : Common::Random::Random64(0)) << 12) & 0xffffff & ~(Common::HostPageSize - 1); |
|
|
|
|
|
|
|
// Setup the process code layout
|
|
|
|
if (process.LoadFromMetadata(system.Kernel(), metadata, code_size, fastmem_base, aslr_offset).IsError()) { |
|
|
|
if (auto res = process.LoadFromMetadata(system.Kernel(), metadata, code_size, fastmem_base, aslr_offset); res.IsError()) { |
|
|
|
LOG_CRITICAL(Loader, "Failed to load ROM directory! (Error {})", res.GetDescription()); |
|
|
|
return {ResultStatus::ErrorUnableToParseKernelMetadata, {}}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -93,7 +93,8 @@ AppLoader::LoadResult AppLoader_KIP::Load(Kernel::KProcess& process, |
|
|
|
? ::Settings::values.rng_seed.GetValue() : Common::Random::Random64(0)) << 12) & 0xffffff & ~(Common::HostPageSize - 1); |
|
|
|
|
|
|
|
// Setup the process code layout
|
|
|
|
if (process.LoadFromMetadata(system.Kernel(), FileSys::ProgramMetadata::GetDefault(), codeset.memory.size(), 0, aslr_offset).IsError()) { |
|
|
|
if (auto res = process.LoadFromMetadata(system.Kernel(), FileSys::ProgramMetadata::GetDefault(), codeset.memory.size(), 0, aslr_offset); res.IsError()) { |
|
|
|
LOG_CRITICAL(Loader, "Failed to load KIP! (Error {})", res.GetDescription()); |
|
|
|
return {ResultStatus::ErrorNotInitialized, {}}; |
|
|
|
} |
|
|
|
const VAddr base_address = GetInteger(process.GetEntryPoint()); |
|
|
|
|
|
|
|
@ -279,9 +279,8 @@ static bool LoadNroImpl(Core::System& system, Kernel::KProcess& process, |
|
|
|
? ::Settings::values.rng_seed.GetValue() : Common::Random::Random64(0)) << 12) & 0xffffff & ~(Common::HostPageSize - 1); |
|
|
|
|
|
|
|
// Setup the process code layout
|
|
|
|
if (process |
|
|
|
.LoadFromMetadata(system.Kernel(), FileSys::ProgramMetadata::GetDefault(), image_size, fastmem_base, aslr_offset) |
|
|
|
.IsError()) { |
|
|
|
if (auto res = process.LoadFromMetadata(system.Kernel(), FileSys::ProgramMetadata::GetDefault(), image_size, fastmem_base, aslr_offset); res.IsError()) { |
|
|
|
LOG_CRITICAL(Loader, "Failed to load NRO! (Error {})", res.GetDescription()); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
|