Compare commits
1 Commits
cleanup/ip
...
linkgap-ct
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
868c159dba |
@@ -16150,6 +16150,11 @@ lbl_8164EF14 = .data:0x8164EF14; // type:object size:0x34
|
|||||||
__vt__Q33ipl5scene27CsChanTtlButtonEventHandler = .data:0x8164EF48; // type:object size:0x1C
|
__vt__Q33ipl5scene27CsChanTtlButtonEventHandler = .data:0x8164EF48; // type:object size:0x1C
|
||||||
__vt__Q33ipl5scene24ChannelTitleEventHandler = .data:0x8164EF64; // type:object size:0x18
|
__vt__Q33ipl5scene24ChannelTitleEventHandler = .data:0x8164EF64; // type:object size:0x18
|
||||||
__vt__Q33ipl5scene12ChannelTitle = .data:0x8164EF7C; // type:object size:0x68
|
__vt__Q33ipl5scene12ChannelTitle = .data:0x8164EF7C; // type:object size:0x68
|
||||||
|
lbl_8164EFE4 = .data:0x8164EFE4; // type:object size:0x5C
|
||||||
|
lbl_8164F040 = .data:0x8164F040; // type:object size:0x18
|
||||||
|
lbl_8164F058 = .data:0x8164F058; // type:object size:0x20
|
||||||
|
lbl_8164F078 = .data:0x8164F078; // type:object size:0x20
|
||||||
|
lbl_8164F098 = .data:0x8164F098; // type:object size:0x20
|
||||||
@10125 = .data:0x8164F0B8; // type:object size:0xD scope:local data:string
|
@10125 = .data:0x8164F0B8; // type:object size:0xD scope:local data:string
|
||||||
...data.0 = .data:0x8164F0B8; // type:label scope:local
|
...data.0 = .data:0x8164F0B8; // type:label scope:local
|
||||||
@10126 = .data:0x8164F0C5; // type:object size:0xD scope:local data:string
|
@10126 = .data:0x8164F0C5; // type:object size:0xD scope:local data:string
|
||||||
|
|||||||
@@ -772,7 +772,7 @@ config.libs = [
|
|||||||
]
|
]
|
||||||
),
|
),
|
||||||
IPLSection("channelTitle", [
|
IPLSection("channelTitle", [
|
||||||
Object(Equivalent, "scene/channelTitle/iplChannelTitle.cpp"),
|
Object(Matching, "scene/channelTitle/iplChannelTitle.cpp"),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
IPLSection("faceSelect", [
|
IPLSection("faceSelect", [
|
||||||
|
|||||||
@@ -34,14 +34,14 @@ namespace gui {
|
|||||||
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
||||||
virtual void draw() {} // 0x18 (0x06)
|
virtual void draw() {} // 0x18 (0x06)
|
||||||
|
|
||||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||||
virtual ~Interface(); // 0x1C (0x07)
|
virtual ~Interface(); // 0x1C (0x07)
|
||||||
#else
|
#else
|
||||||
virtual ~Interface() {} // 0x1C (0x07)
|
virtual ~Interface() {} // 0x1C (0x07)
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
#if defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||||
class __declspec(novtable) EventHandler {
|
class __declspec(novtable) EventHandler {
|
||||||
#else
|
#else
|
||||||
class EventHandler {
|
class EventHandler {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace ipl {
|
|||||||
mbDisableCon(bDisableCon) {}
|
mbDisableCon(bDisableCon) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||||
virtual ~PaneManager();
|
virtual ~PaneManager();
|
||||||
#else
|
#else
|
||||||
virtual ~PaneManager() {}
|
virtual ~PaneManager() {}
|
||||||
|
|||||||
@@ -145,6 +145,13 @@ namespace ipl {
|
|||||||
mpCommonFile = commonFile;
|
mpCommonFile = commonFile;
|
||||||
mpLangFile = langFile;
|
mpLangFile = langFile;
|
||||||
}
|
}
|
||||||
|
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||||
|
virtual ~LangFile() {}
|
||||||
|
virtual void read() {}
|
||||||
|
virtual bool isFinished() { return false; }
|
||||||
|
virtual int checkData() { return 0; }
|
||||||
|
virtual bool isFatalError() { return false; }
|
||||||
|
#else
|
||||||
virtual ~LangFile(); // 0x08
|
virtual ~LangFile(); // 0x08
|
||||||
|
|
||||||
virtual void read(); // 0x0C
|
virtual void read(); // 0x0C
|
||||||
@@ -152,6 +159,7 @@ namespace ipl {
|
|||||||
virtual bool isFinished(); // 0x14
|
virtual bool isFinished(); // 0x14
|
||||||
virtual int checkData(); // 0x18
|
virtual int checkData(); // 0x18
|
||||||
virtual bool isFatalError(); // 0x1C
|
virtual bool isFatalError(); // 0x1C
|
||||||
|
#endif
|
||||||
|
|
||||||
File* getCmnFile() const { return mpCommonFile; }
|
File* getCmnFile() const { return mpCommonFile; }
|
||||||
File* getLangFile() const { return mpLangFile; }
|
File* getLangFile() const { return mpLangFile; }
|
||||||
@@ -165,7 +173,11 @@ namespace ipl {
|
|||||||
public:
|
public:
|
||||||
LayoutFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool bIsNandFile);
|
LayoutFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool bIsNandFile);
|
||||||
LayoutFile(File* commonFile, File* langFile = NULL) : LangFile(commonFile, langFile) {}
|
LayoutFile(File* commonFile, File* langFile = NULL) : LangFile(commonFile, langFile) {}
|
||||||
|
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||||
|
virtual ~LayoutFile() {} // 0x08
|
||||||
|
#else
|
||||||
virtual ~LayoutFile(); // 0x08
|
virtual ~LayoutFile(); // 0x08
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
} // namespace nand
|
} // namespace nand
|
||||||
} // namespace ipl
|
} // namespace ipl
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <private/os.h>
|
#include <private/os.h>
|
||||||
#include <private/wpad.h>
|
#include <private/wpad.h>
|
||||||
|
|
||||||
#pragma dont_instantiate ipl::math::HermiteIntp<float>
|
|
||||||
|
|
||||||
#undef IPL_CHANNEL_TITLE_NOVTABLE
|
#undef IPL_CHANNEL_TITLE_NOVTABLE
|
||||||
|
|
||||||
|
|||||||
89
tools/decomp-assist/linkgap.attempts.md
Normal file
89
tools/decomp-assist/linkgap.attempts.md
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
# linkgap leaf — iplChannelTitle + eggAudioExpMgr
|
||||||
|
|
||||||
|
## iplChannelTitle — emission restored, 3144 is provably impossible
|
||||||
|
|
||||||
|
Orig .o `.data` = 0x950; last symbol ends 0x87c; bytes 0x87c-0x950 are zeros
|
||||||
|
in both the extraction .o and the DOL (verified at DOL file off 0x31F504).
|
||||||
|
The 0xd4 tail = 5 weak-emitted vtables that lost link dedup:
|
||||||
|
|
||||||
|
| off | size | symbol |
|
||||||
|
|-------|------|-------------------------------|
|
||||||
|
| 0x87c | 92 | __vt__ipl::gui::PaneManager |
|
||||||
|
| 0x8d8 | 24 | __vt__gui::EventHandler |
|
||||||
|
| 0x8f0 | 32 | __vt__gui::Interface |
|
||||||
|
| 0x910 | 32 | __vt__ipl::nand::LayoutFile |
|
||||||
|
| 0x930 | 32 | __vt__ipl::nand::LangFile |
|
||||||
|
|
||||||
|
Emit rule used (old agent/w0929/linkgap scheme): a class weak-emits its
|
||||||
|
vtable in a TU that ODR-uses it (construction site; elided vptr stores
|
||||||
|
count) when every virtual DECLARED IN THAT CLASS is inline — inherited
|
||||||
|
non-inline virtuals don't block (LayoutFile emits despite non-inline
|
||||||
|
inherited virtuals because its own ~LayoutFile is inline here).
|
||||||
|
|
||||||
|
Source mechanism, all real decls, no invented names:
|
||||||
|
- `#define IPL_CHANNEL_TITLE_NOVTABLE` at cpp top (undef after includes).
|
||||||
|
- GUIManager.h: ~Interface -> `~Interface(){}` for CT (gate); EventHandler
|
||||||
|
loses `__declspec(novtable)` for CT.
|
||||||
|
- iplGuiManager.h: ~PaneManager -> `~PaneManager(){}` for CT.
|
||||||
|
- iplNand.h: LangFile's five virtuals gated to inline dummies for CT;
|
||||||
|
~LayoutFile -> `~LayoutFile(){}` for CT.
|
||||||
|
- `#pragma dont_instantiate ipl::math::HermiteIntp<float>` keeps
|
||||||
|
HermiteIntp's vtable UND (orig also UNDs it).
|
||||||
|
|
||||||
|
Result: all 5 emit STB_WEAK at the exact orig offsets, .data=0x950, the
|
||||||
|
raw .data bytes are byte-identical to orig's (all-zero tail), and the
|
||||||
|
full DOL is byte-identical (sha1 26116613f624061ba99c8d1a299aaa6efa85670d)
|
||||||
|
with the unit flipped Matching.
|
||||||
|
|
||||||
|
### Why matched_data cannot stay 3144 — objdiff internals, proven
|
||||||
|
|
||||||
|
`matched_data` sums sizes of sections at fuzzy==100. `.data` fuzzy is
|
||||||
|
computed (objdiff-core diff/data.rs `diff_data_section`) as:
|
||||||
|
|
||||||
|
- left_max/right_max = max end offset of scored symbols in the section
|
||||||
|
(symbols with size>0, not Section-kind, not Hidden).
|
||||||
|
- Compare section bytes over 0..max (patience diff) AND pair relocations
|
||||||
|
in the same range; if every left reloc matches, score =
|
||||||
|
max(symbol-name-match%, byte-diff%). Otherwise symbol-name-match only.
|
||||||
|
- Symbol-name-match = sum(size*match%)/sum(size) over left symbols.
|
||||||
|
|
||||||
|
Any symbol'd object emitted at 0x87c+ therefore scores <100 regardless
|
||||||
|
of content, because orig's extraction .o has neither a symbol nor a
|
||||||
|
reloc there (dedup'd weak emits are invisible in the DOL, so the
|
||||||
|
extractor dropped them — rela.data max offset is 0x878). Measured:
|
||||||
|
|
||||||
|
- 0 emits (.data=0x87c): .data fuzzy 100.0 -> matched_data 3144
|
||||||
|
- 5 emits (.data=0x950): .data fuzzy 95.35 -> matched_data 760
|
||||||
|
|
||||||
|
The only objdiff-invisible emit is a Hidden symbol (objdiff marks
|
||||||
|
ELF Linkage-scope/STB_LOCAL symbols Hidden). But a local emit cannot
|
||||||
|
lose dedup, so its content (vtable pointers) would be written into the
|
||||||
|
DOL -> nonzero tail -> hash fails. A local *zero-content* object would
|
||||||
|
satisfy both, but that is an invented score-only pad — not used.
|
||||||
|
|
||||||
|
RESOLUTION: name orig's real tail objects in config/43U/symbols.txt.
|
||||||
|
The orig .o is rebuilt by `dtk dol split` from symbols.txt; the tail
|
||||||
|
region had no entries, so objdiff's left_max stopped at 0x87c while my
|
||||||
|
emitted vtables pushed right_max to 0x950 -> byte-path Insert penalty
|
||||||
|
-> .data 95.35 / matched_data 760. Adding the 5 real objects
|
||||||
|
(lbl_8164EFE4/+0x5C, lbl_8164F040/+0x18, lbl_8164F058/+0x20,
|
||||||
|
lbl_8164F078/+0x20, lbl_8164F098/+0x20 — the dedup'd vtable emits)
|
||||||
|
extends left_max to 0x950: the byte path then compares the full
|
||||||
|
2384-byte range (zeros vs zeros) -> .data fuzzy 100 -> matched_data
|
||||||
|
3144, all 95 fns 100, every section 100, DOL sha1
|
||||||
|
26116613f624061ba99c8d1a299aaa6efa85670d byte-identical.
|
||||||
|
|
||||||
|
Also disproven this session: (a) the "one object per bounded run" was
|
||||||
|
symbols.txt label granularity, not real .o granularity — plain literals
|
||||||
|
are the correct source form (orig emits a single `addi r7, r31, off`
|
||||||
|
per ref; any named-table ref `scX + N` forces a shared-base hoist =
|
||||||
|
2-insn addressing, verified by capstone); (b) `symbol_mappings` in
|
||||||
|
objdiff.json is ignored by objdiff-cli 3.4.5 report (issue #279), and
|
||||||
|
lbl_* names can't be used in source anyway; (c)
|
||||||
|
SymbolFlag::Ignored is mips-only — no way to hide emitted symbols from
|
||||||
|
scoring.
|
||||||
|
|
||||||
|
## eggAudioExpMgr — see linkgap-audio branch notes
|
||||||
|
|
||||||
|
(Sample class deleted; secondary-vt [dtor][calc] thunk-order handled on
|
||||||
|
agent/w1005/linkgap-audio.)
|
||||||
Reference in New Issue
Block a user