Repository navigation
[AUTOMATED] fix(analysis): bound 24-byte PPC64 ELFv1 functions and keep the starts a call or descriptor names - #1993
Merged
Conversation
…ep the starts a call or descriptor names
Resolves the docs/baseline-stages.json conflict by re-recording it on the merged tree: 5,538 assertions, main's 5,536 plus this PR's two new elfv1-symbolextent assertions (Noelo-Lab#7, Noelo-Lab#8), with Noelo-Lab#1-Noelo-Lab#3 renamed. The corpus count stays 935. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
decode_ppc64_stubs calls kuna_ppc64_stubs::stub_at once for every .text word, and on PowerPC resolve_from_sections runs about 20 times per load. The code this PR adds to kuna-analysis changed LLVM's inlining, and stub_at became an out-of-line call. Under callgrind, `kuna functions` then ran 2.4-2.5% more instructions on ELFv1 libglib and libstdc++, and on ppc64el ELFv2 libglib, where none of the PR's logic runs. #[inline] restores it: +0.22% / +0.28% (the cost of the PR's named-start scan) and +0.03% on ELFv2. This is only an inlining hint and changes no output. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Main moved to 64a81b6 (Noelo-Lab#1990 added a stage). The corpus count auto-merges to 936, and docs/baseline-stages.json is re-recorded on the merged tree: 5,542 assertions, main's 5,540 plus this PR's two new elfv1-symbolextent assertions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Contributor
|
[AUTOMATED] Pushed three commits on top of 512acfb, without force:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Since #1976, kuna drops a gap-walk start inside a sized PowerPC64 ELFv1 function even when a call names it, and still splits a function of exactly 24 bytes, whose size it skips. Below,
sampleis 24 bytes, andcaller, which nothing calls, calls into the middle ofother.sub_d3cis 8 bytes intosample.0xd60, the target ofcaller's call, was listed before #1976 and no longer is.The fix
.namesymbols of the dot-symbol ABI (-mcall-aixdesc) do. A 24-byte function is then bounded like any other, and the spec's note that it filters nothing is replaced..opddescriptor or ablnames is kept..opd.Tests
kuna-elfv1-symbolextent.xmlgains a 24-byte function, a call from an uncalled export and a descriptor with no symbol, in both byte orders. On current main the 24-byte function's false start and lost result fail, and so do the two kept starts. The existing assertions move with the fixture's addresses, and its dot-symbol descriptor gains the.dottedsymbol that ABI emits, since a 24-byte descriptor symbol without one now bounds 24 bytes of code. Unit tests cover the.namerule, the named starts and an unvalidated descriptor. Over 1,494 ELFv1 images and 1,458 stripped copies, no listed function changes against current main, and listing time is unchanged.