ncch_container: Apply IPS patch after allocating .bss

This allows an IPS patch to edit .bss. This is useful for game patches
that need to add code, as putting things in .bss allows adding new code
*without* editing .code and thus without having to relocate everything.
This commit is contained in:
Léo Lam
2019-07-10 12:57:30 +02:00
parent 2f7a10eeaa
commit 43d1ee6fb7
3 changed files with 26 additions and 14 deletions
+7
View File
@@ -271,6 +271,13 @@ public:
*/
Loader::ResultStatus ReadExtdataId(u64& extdata_id);
/**
* Apply an IPS patch for .code (if it exists).
* This should only be called after allocating .bss.
* @return bool true if a patch was applied, false otherwise
*/
bool ApplyIPSPatch(std::vector<u8>& code) const;
/**
* Checks whether the NCCH container contains an ExeFS
* @return bool check result