diff options
| author | user <user@clank> | 2026-10-01 18:36:14 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-10-01 18:36:14 +0200 |
| commit | 9b8ca8bf46756041a63b644ee8dc2931dee569c9 (patch) | |
| tree | 7e408ea557e4b66aca1688748d98e777b540b8ac /fw/ta_ida.py | |
| parent | remove the now-empty LIB_RENAME_PENDING block (diff) | |
| download | amd-psp-re-9b8ca8bf46756041a63b644ee8dc2931dee569c9.tar.gz amd-psp-re-9b8ca8bf46756041a63b644ee8dc2931dee569c9.tar.xz amd-psp-re-9b8ca8bf46756041a63b644ee8dc2931dee569c9.zip | |
name six more library routines from their bodies; placeholders 235 -> 112
Second round on the placeholder clusters, now that the seed-consistency fix makes applying these
safe rather than a net loss. Each reason is recorded because a name is an identity claim:
vsnprintf_out_str_guarded "if (state->field14 == 0) vsnprintf_out_str(a1,a2,a3)" -- a guard on
the same field, calling the writer already named last round
vsnprintf_out_guarded the same shape against *(a1 + 20), which is field14
vsnprintf_fmt_integer switches on the conversion character (a2 == 117, 'u') and calls
vsnprintf_narrow_unsigned
call_once_init "if (*g == NULL) { SVC 0xF3; *g = a1; } return (*g)(...)" -- lazy
one-time initialisation through a supervisor call
runtime_globals returns the fixed global off_4022CC
runtime_globals_field1 returns runtime_globals() + 1
Placeholder names drop from 235 to 112. Named count and field share are unchanged at 66.9% and
67.5%, which is the expected and correct outcome: this renames functions that were already
counted as named, so it improves what the artifacts SAY without moving what they cover.
Seven clusters, 112 instances, are deliberately left as placeholders. lib_33b2ae33_16 writes 2*a2
through a register base the decompiler shows as uninitialised; lib_e6824d52_24 and lib_1bc49253_28
are two near-identical conversion arms I cannot separate; lib_366a1ceb_178 and lib_8680f995_112 are
the two large formatters, visibly handling width and precision but not distinguishable from each
other; lib_d732abea_240 and lib_2cd87843_108 are arithmetic and formatting bodies whose role I
would be inventing. Mislabelling 112 instances is worse than leaving them honest.
Diffstat (limited to 'fw/ta_ida.py')
| -rw-r--r-- | fw/ta_ida.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fw/ta_ida.py b/fw/ta_ida.py index 70540a6..da4817a 100644 --- a/fw/ta_ida.py +++ b/fw/ta_ida.py @@ -295,6 +295,29 @@ LIB_RENAME = { "lib_852e460a_16": "vsnprintf_emit_char_bounded", "lib_5f016438_18": "vsnprintf_narrow_signed", "lib_3cf46bff_18": "vsnprintf_narrow_unsigned", + # Second round, named from their bodies after the seed-consistency fix made applying them + # safe. Reasons, since a name is an identity claim: + # vsnprintf_out_str_guarded "if (state->field14 == 0) vsnprintf_out_str(a1,a2,a3)" -- + # a guard on the same field, calling the already-named writer + # vsnprintf_out_guarded the same shape against *(a1+20), which IS field14 + # vsnprintf_fmt_integer switches on the conversion char (a2 == 117, 'u') and calls + # vsnprintf_narrow_unsigned + # call_once_init "if (*g == NULL) { SVC 0xF3; *g = a1; } return (*g)(...)" -- + # lazy one-time init through a supervisor call + # runtime_globals returns the fixed global off_4022CC + # runtime_globals_field1 returns runtime_globals() + 1 + "lib_71f66102_20": "vsnprintf_out_str_guarded", + "lib_78974a43_20": "vsnprintf_out_guarded", + "lib_e4cd8bbc_96": "vsnprintf_fmt_integer", + "lib_c457fbe2_30": "call_once_init", + "lib_06936d05_4": "runtime_globals", + "lib_a1b8c8fb_10": "runtime_globals_field1", + # Still unnamed on purpose. lib_33b2ae33_16 writes 2*a2 into an uninitialised-looking + # register base; lib_e6824d52_24 and lib_1bc49253_28 are two near-identical conversion + # arms I cannot separate; lib_366a1ceb_178 and lib_8680f995_112 are the two large + # formatters and I can see they handle width/precision but not which is which; + # lib_d732abea_240 and lib_2cd87843_108 are arithmetic/format bodies whose role I would be + # guessing at. 111 instances left placeholder rather than mislabelled. } # PENDING, not applied. CAUSE STILL UNKNOWN -- two explanations have been offered and both were |
