mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-08 07:20:16 +00:00
git subrepo pull --force tools/fado (#1138)
subrepo: subdir: "tools/fado" merged: "a0fa82808" upstream: origin: "git@github.com:EllipticEllipsis/fado.git" branch: "master" commit: "a0fa82808" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
This commit is contained in:
parent
eadc477187
commit
6fd0f3cff2
16 changed files with 977 additions and 34 deletions
|
@ -123,7 +123,7 @@ static const FairyDefineString relSectionNames[] = {
|
|||
{ 0 },
|
||||
};
|
||||
|
||||
/* Taken from elf.h */
|
||||
/* Taken from elf.h/mips_elf.h */
|
||||
static const FairyDefineString relTypeNames[] = {
|
||||
FAIRY_DEF_STRING(, R_MIPS_NONE), /* No reloc */
|
||||
FAIRY_DEF_STRING(, R_MIPS_16), /* Direct 16 bit */
|
||||
|
|
|
@ -114,7 +114,7 @@ void Help_PrintHelp(const char* prologue, size_t posArgCount, const PosArgInfo*
|
|||
|
||||
if (posArgCount != 0) {
|
||||
printf("\nPositional Argument\n");
|
||||
for (i = 0; i < optCount; i++) {
|
||||
for (i = 0; i < posArgCount; i++) {
|
||||
if (posArgInfo[i].helpArg == 0) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ char* GetOverlayNameFromFilename(const char* src) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
#define OPTSTR "M:n:o:v:hV"
|
||||
#define OPTSTR "M:n:o:v:ahV"
|
||||
#define USAGE_STRING "Usage: %s [-hV] [-n name] [-o output_file] [-v level] input_files ...\n"
|
||||
|
||||
#define HELP_PROLOGUE \
|
||||
|
@ -75,6 +75,8 @@ static const OptInfo optInfo[] = {
|
|||
{ { "output-file", required_argument, NULL, 'o' }, "FILE", "Output to FILE. Will use stdout if none is specified" },
|
||||
{ { "verbosity", required_argument, NULL, 'v' }, "N", "Verbosity level, one of 0 (None, default), 1 (Info), 2 (Debug)" },
|
||||
|
||||
{ { "alignment", no_argument, NULL, 'a' }, NULL, "Experimental. Use the alignment declared by each section in the elf file instead of padding to 0x10 bytes. NOTE: It has not been properly tested because the tools we currently have are not compatible non 0x10 alignment" },
|
||||
|
||||
{ { "help", no_argument, NULL, 'h' }, NULL, "Display this message and exit" },
|
||||
{ { "version", no_argument, NULL, 'V' }, NULL, "Display version information" },
|
||||
|
||||
|
@ -82,7 +84,7 @@ static const OptInfo optInfo[] = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
static size_t posArgCount = ARRAY_COUNT(optInfo);
|
||||
static size_t posArgCount = ARRAY_COUNT(posArgInfo);
|
||||
static size_t optCount = ARRAY_COUNT(optInfo);
|
||||
static struct option longOptions[ARRAY_COUNT(optInfo)];
|
||||
|
||||
|
@ -142,6 +144,13 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
#ifndef EXPERIMENTAL
|
||||
goto not_experimental_err;
|
||||
#endif
|
||||
gUseElfAlignment = true;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
printf(USAGE_STRING, argv[0]);
|
||||
Help_PrintHelp(HELP_PROLOGUE, posArgCount, posArgInfo, optCount, optInfo, HELP_EPILOGUE);
|
||||
|
@ -226,4 +235,12 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
goto not_experimental_err; // silences a warning
|
||||
not_experimental_err:
|
||||
fprintf(
|
||||
stderr,
|
||||
"Experimental option '-%c' passed in a non-EXPERIMENTAL build. Rebuild with 'make EXPERIMENTAL=1' to enable.\n",
|
||||
opt);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (C) 2021 Elliptic Ellipsis */
|
||||
/* SPDX-License-Identifier: AGPL-3.0-only */
|
||||
const char versionNumber[] = "1.1.1";
|
||||
const char credits[] = "Written by Elliptic Ellipsis\n Special Thanks: AngheloAlf";
|
||||
const char versionNumber[] = "1.2.1";
|
||||
const char credits[] = "Written by Elliptic Ellipsis\nand AngheloAlf";
|
||||
const char repo[] = "https://github.com/EllipticEllipsis/fado/";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue