mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-15 06:06:04 +00:00
git subrepo pull --force tools/fado (#1924)
subrepo: subdir: "tools/fado" merged: "7fad57f83" upstream: origin: "git@github.com:EllipticEllipsis/fado.git" branch: "master" commit: "7fad57f83" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb"
This commit is contained in:
parent
17d683780d
commit
5834c335e6
6 changed files with 11 additions and 22 deletions
|
@ -6,7 +6,7 @@
|
||||||
[subrepo]
|
[subrepo]
|
||||||
remote = git@github.com:EllipticEllipsis/fado.git
|
remote = git@github.com:EllipticEllipsis/fado.git
|
||||||
branch = master
|
branch = master
|
||||||
commit = 8d896ee97d565508755584803c409fc33bb0c953
|
commit = 7fad57f834a86b6a752292996f99f08771f29df4
|
||||||
parent = 9f09505d34619883748a7dab05071883281c14fd
|
parent = 17d683780d3878159959a87a9c4a2683d8781ef2
|
||||||
method = merge
|
method = merge
|
||||||
cmdver = 0.4.5
|
cmdver = 0.4.6
|
||||||
|
|
|
@ -57,7 +57,7 @@ clean:
|
||||||
$(RM) -r build $(ELF)
|
$(RM) -r build $(ELF)
|
||||||
|
|
||||||
format:
|
format:
|
||||||
clang-format-11 -i $(C_FILES) $(H_FILES) lib/fairy/*
|
clang-format-14 -i $(C_FILES) $(H_FILES) lib/fairy/*
|
||||||
|
|
||||||
.PHONY: all clean format
|
.PHONY: all clean format
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,7 @@ void Fairy_PrintSectionSizes(FairySecHeader* sectionTable, FILE* inputFile, size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Can use symbols here too */
|
/* Can use symbols here too */
|
||||||
puts(".section .ovl");
|
puts(".section .ovl, \"a\"");
|
||||||
printf("# OverlayInfo\n");
|
printf("# OverlayInfo\n");
|
||||||
printf(".word 0x%08X # .text size\n", textSize);
|
printf(".word 0x%08X # .text size\n", textSize);
|
||||||
printf(".word 0x%08X # .data size\n", dataSize);
|
printf(".word 0x%08X # .data size\n", dataSize);
|
||||||
|
|
|
@ -17,16 +17,6 @@
|
||||||
|
|
||||||
/* String-finding-related functions */
|
/* String-finding-related functions */
|
||||||
|
|
||||||
bool Fado_CheckInProgBitsSections(Elf32_Section section, vc_vector* progBitsSections) {
|
|
||||||
Elf32_Section* i;
|
|
||||||
VC_FOREACH(i, progBitsSections) {
|
|
||||||
if (*i == section) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For each input file, construct a vector of pointers to the starts of the strings defined in that file.
|
* For each input file, construct a vector of pointers to the starts of the strings defined in that file.
|
||||||
*/
|
*/
|
||||||
|
@ -41,8 +31,7 @@ void Fado_ConstructStringVectors(vc_vector** stringVectors, FairyFileInfo* fileI
|
||||||
|
|
||||||
/* Build a vector of pointers to defined symbols' names */
|
/* Build a vector of pointers to defined symbols' names */
|
||||||
for (currentSym = 0; currentSym < fileInfo[currentFile].symtabInfo.sectionEntryCount; currentSym++) {
|
for (currentSym = 0; currentSym < fileInfo[currentFile].symtabInfo.sectionEntryCount; currentSym++) {
|
||||||
if ((symtab[currentSym].st_shndx != STN_UNDEF) &&
|
if (symtab[currentSym].st_shndx != STN_UNDEF) {
|
||||||
Fado_CheckInProgBitsSections(symtab[currentSym].st_shndx, fileInfo[currentFile].progBitsSections)) {
|
|
||||||
/* Have to pass a double pointer so it copies the pointer instead of the start of the string */
|
/* Have to pass a double pointer so it copies the pointer instead of the start of the string */
|
||||||
char* stringPtr = &fileInfo[currentFile].strtab[symtab[currentSym].st_name];
|
char* stringPtr = &fileInfo[currentFile].strtab[symtab[currentSym].st_name];
|
||||||
assert(vc_vector_push_back(stringVectors[currentFile], &stringPtr));
|
assert(vc_vector_push_back(stringVectors[currentFile], &stringPtr));
|
||||||
|
@ -251,7 +240,7 @@ void Fado_Relocs(FILE* outputFile, int inputFilesCount, FILE** inputFiles, const
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Write header */
|
/* Write header */
|
||||||
fprintf(outputFile, ".section .ovl\n");
|
fprintf(outputFile, ".section .ovl, \"a\"\n");
|
||||||
fprintf(outputFile, "# %sOverlayInfo\n", ovlName);
|
fprintf(outputFile, "# %sOverlayInfo\n", ovlName);
|
||||||
fprintf(outputFile, ".word _%sSegmentTextSize\n", ovlName);
|
fprintf(outputFile, ".word _%sSegmentTextSize\n", ovlName);
|
||||||
fprintf(outputFile, ".word _%sSegmentDataSize\n", ovlName);
|
fprintf(outputFile, ".word _%sSegmentDataSize\n", ovlName);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Copyright (C) 2021 Elliptic Ellipsis */
|
/* Copyright (C) 2021 Elliptic Ellipsis */
|
||||||
/* SPDX-License-Identifier: AGPL-3.0-only */
|
/* SPDX-License-Identifier: AGPL-3.0-only */
|
||||||
const char versionNumber[] = "1.3.1";
|
const char versionNumber[] = "1.3.2";
|
||||||
const char credits[] = "Written by Elliptic Ellipsis\nwith additions from AngheloAlf and Tharo";
|
const char credits[] = "Written by Elliptic Ellipsis\nwith additions from AngheloAlf and Tharo";
|
||||||
const char repo[] = "https://github.com/EllipticEllipsis/fado/";
|
const char repo[] = "https://github.com/EllipticEllipsis/fado/";
|
||||||
|
|
Loading…
Reference in a new issue