Added support for disabling padding between segments for code

Fixed potential bug where code size is calculated by taking the page size of combined segments rather than the combined padded segment size. This could be a problem, for example, if two segments add up to require two pages of padding.
Fixed potential bug where memory-size is used for codeDetails.rwSize; this counts .bss which is not in the file
This commit is contained in:
Yifan Lu
2016-03-24 17:48:14 -05:00
parent 9dc611bbbf
commit cf2ba24d69
5 changed files with 27 additions and 7 deletions
+1
View File
@@ -177,6 +177,7 @@ int GetBasicOptions(ncch_settings *ncchset, user_settings *usrset)
ncchset->options.IsCfa = (usrset->ncch.ncchType == CFA);
ncchset->options.IsBuildingCodeSection = (usrset->ncch.elfPath != NULL);
ncchset->options.UseRomFS = ((ncchset->rsfSet->RomFs.RootPath && strlen(ncchset->rsfSet->RomFs.RootPath) > 0) || usrset->ncch.romfsPath);
ncchset->options.noCodePadding = usrset->ncch.noCodePadding;
ncchset->options.useSecCrypto = usrset->ncch.useSecCrypto;
ncchset->options.keyXID = usrset->ncch.keyXID;