mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 08:49:03 +00:00
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:
@@ -92,6 +92,7 @@ void SetDefaults(user_settings *set)
|
||||
set->ncch.includeExefsLogo = false;
|
||||
set->common.outFormat = NCCH;
|
||||
set->ncch.ncchType = format_not_set;
|
||||
set->ncch.noCodePadding = false;
|
||||
|
||||
// RSF Settings
|
||||
clrmem(&set->common.rsfSet, sizeof(rsf_settings));
|
||||
@@ -352,6 +353,14 @@ int SetArgument(int argc, int i, char *argv[], user_settings *set)
|
||||
set->ncch.ncchType |= CFA;
|
||||
return 1;
|
||||
}
|
||||
else if (strcmp(argv[i], "-nocodepadding") == 0) {
|
||||
if (ParamNum) {
|
||||
PrintNoNeedParam(argv[i]);
|
||||
return USR_BAD_ARG;
|
||||
}
|
||||
set->ncch.noCodePadding = true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Ncch Rebuild Options
|
||||
else if (strcmp(argv[i], "-code") == 0) {
|
||||
@@ -941,6 +950,7 @@ void DisplayExtendedHelp(char *app_name)
|
||||
printf(" -logo <file> Logo file (Overrides \"BasicInfo/Logo\" in RSF)\n");
|
||||
printf(" -desc <apptype>:<fw> Specify Access Descriptor template\n");
|
||||
printf(" -exefslogo Include Logo in ExeFS (Required for usage on <5.0 systems)\n");
|
||||
printf(" -nocodepadding For building sysmodules, do not pad .code segments\n");
|
||||
printf("NCCH REBUILD OPTIONS:\n");
|
||||
printf(" -code <file> Decompressed ExeFS \".code\"\n");
|
||||
printf(" -exheader <file> Exheader template\n");
|
||||
|
||||
Reference in New Issue
Block a user