-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fake headers for unsolved weak objects to reduce manual copy-pasting
- Loading branch information
1 parent
cb75b2d
commit 329d94a
Showing
84 changed files
with
208 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef WEAK_BSS_3569_H | ||
#define WEAK_BSS_3569_H | ||
|
||
// Fake header. | ||
// This is some kind of weak objects that get included in the .bss sections of several TUs. | ||
// Its true source is currently unknown, so include this header in TUs that need it to match for now. | ||
|
||
#include "dolphin/mtx/vec.h" | ||
|
||
static Vec bss_3569; | ||
|
||
#endif /* WEAK_BSS_3569_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef WEAK_BSS_936_TO_1036_H | ||
#define WEAK_BSS_936_TO_1036_H | ||
|
||
// Fake header. | ||
// These are some kind of weak objects that get included in the .bss sections of several TUs. | ||
// Their true source is currently unknown, so include this header in TUs that need them to match for now. | ||
|
||
#include "global.h" | ||
|
||
#include "weak_bss_3569.h" // IWYU pragma: keep | ||
|
||
// They each have size 1, and alignment 1 in the debug maps, but alignment 4 in the non-debug maps. | ||
static u8 bss_1036 ALIGN_DECL(4); | ||
static u8 bss_1034 ALIGN_DECL(4); | ||
static u8 bss_1032 ALIGN_DECL(4); | ||
static u8 bss_1031 ALIGN_DECL(4); | ||
static u8 bss_1026 ALIGN_DECL(4); | ||
static u8 bss_1024 ALIGN_DECL(4); | ||
static u8 bss_1022 ALIGN_DECL(4); | ||
static u8 bss_1021 ALIGN_DECL(4); | ||
static u8 bss_984 ALIGN_DECL(4); | ||
static u8 bss_982 ALIGN_DECL(4); | ||
static u8 bss_980 ALIGN_DECL(4); | ||
static u8 bss_979 ALIGN_DECL(4); | ||
static u8 bss_941 ALIGN_DECL(4); | ||
static u8 bss_939 ALIGN_DECL(4); | ||
static u8 bss_937 ALIGN_DECL(4); | ||
static u8 bss_936 ALIGN_DECL(4); | ||
|
||
#endif /* WEAK_BSS_936_TO_1036_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef WEAK_DATA_1811_H | ||
#define WEAK_DATA_1811_H | ||
|
||
// Fake header. | ||
// @1811 is a weak object that gets included in the .data sections of several TUs. | ||
// Its true source is this line: | ||
// u8 attnFnTbl[] = { GX_AF_NONE, GX_AF_SPEC, GX_AF_NONE, GX_AF_SPOT }; | ||
// Which appears in the weak function J3DColorChan::getAttnFn, which is supposed to go in a header. | ||
// But for some reason, that line causes the weak objects to appear in .rodata. | ||
// So for now, that function is moved to the .cpp file, and TUs that need this object should include this header. | ||
|
||
#include "weak_data_2100_2080.h" // IWYU pragma: keep | ||
|
||
static u8 data_1811[] = {0x02, 0x00, 0x02, 0x01}; | ||
|
||
// This object is strange, as it has no symbol associated with it. | ||
// It always seems to come after @1811 ends at offset 0x1C, getting padded to start at 0x20 and ending at 0x30. | ||
// It being an array of two doubles is guessed based on how it looks and its apparently 0x8 byte alignment. | ||
// Its actual purpose is unknown since it's never used. | ||
static f64 data_no_symbol_3_5[2] = {3.0, 0.5}; | ||
|
||
#endif /* WEAK_DATA_1811_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef WEAK_DATA_2100_2080_H | ||
#define WEAK_DATA_2100_2080_H | ||
|
||
// Fake header. | ||
// These are weak objects that get included in the .data sections of several TUs. | ||
// Their true source is likely this line of code that appears twice in J3DJoint.h: | ||
// J3DSys::mParentS = (Vec){1.0f, 1.0f, 1.0f}; | ||
// But for some reason, that line causes the weak objects to appear in .rodata. | ||
// So for now, the line is commented out, and TUs that need these objects should include this header. | ||
// Note: For d_snap and J3DUClipper, these objects *are* supposed to appear in .rodata, but those are the only ones. | ||
|
||
#include "dolphin/mtx/vec.h" | ||
|
||
static Vec data_2100 = {1.0f, 1.0f, 1.0f}; | ||
static Vec data_2080 = {1.0f, 1.0f, 1.0f}; | ||
|
||
#endif /* WEAK_DATA_2100_2080_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.