fix(tools): stop ELF dependency audits at DT_NULL #5283

Merged
Ondra97 merged 1 commit from upstream-pr/5283 into main 2026-10-14 18:53:45 +00:00
Ondra97 commented 2026-10-13 16:27:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-13T16:27:01Z.


What

The section-header ELF reader interpreted DT_NEEDED entries after DT_NULL as active dependencies, producing false missing-library reports. Stop at the first terminator, matching the existing sectionless reader and ELF gABI section 8.3. Dependencies before the terminator are retained.

Tested

Windows, Python 3.14, synthetic ELF module: the new regression failed on main with exit 1 instead of 0 for a dependency after DT_NULL. After the fix, the full import_audit suite passed 47/47. The regression also verifies a dependency preceding DT_NULL. Python-only change; no title run or runtime-library behavior is claimed.

Local conventions and whitespace checks passed. Current open PRs were checked for overlapping files, lines and functions.

CI relinker builds and test suites passed on Linux, Windows and macOS for d327a7e23 (Build). Full runtime-library jobs were skipped by the automatic PR policy.

Combined local validation of #5283, #5286, #5298, #5302, #5305, #5308 and #5310 on main 61b8742b6: all seven patches merge without conflicts; the full relinker-only build and 150/150 CTest tests passed.

Checklist

  • Based on current main; no other open PR implements the same functions

  • One topic per PR; follow-ups go in a new PR

  • No comments in code except technical debt

  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file

  • No notes, investigation .md files or images added to the repository (attach them to this PR)

  • New third-party code is a submodule built from source

  • Generic behaviour, not specific to one title

  • Depends on: none

  • Unblocks: none

  • GPUs tested: n/a

  • AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4846279911 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5283). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-10-13T16:27:01Z. --- ### What The section-header ELF reader interpreted DT_NEEDED entries after DT_NULL as active dependencies, producing false missing-library reports. Stop at the first terminator, matching the existing sectionless reader and [ELF gABI section 8.3](https://gabi.xinuos.com/elf/08-dynamic.html#dynamic-section). Dependencies before the terminator are retained. ### Tested Windows, Python 3.14, synthetic ELF module: the new regression failed on main with exit 1 instead of 0 for a dependency after DT_NULL. After the fix, the full import_audit suite passed 47/47. The regression also verifies a dependency preceding DT_NULL. Python-only change; no title run or runtime-library behavior is claimed. Local conventions and whitespace checks passed. Current open PRs were checked for overlapping files, lines and functions. CI relinker builds and test suites passed on Linux, Windows and macOS for `d327a7e23` ([Build](https://github.com/boykopovar/AnyPS5/actions/runs/38434762960)). Full runtime-library jobs were skipped by the automatic PR policy. Combined local validation of #5283, #5286, #5298, #5302, #5305, #5308 and #5310 on main `61b8742b6`: all seven patches merge without conflicts; the full relinker-only build and 150/150 CTest tests passed. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
adriadam10 commented 2026-10-14 18:12:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T18:12:01Z.


Checked the DT_NULL stop against the sectionless reader and the gABI; the new test fails on main without the fix and passes with it (import_audit, plus the dependency before DT_NULL is kept). Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6175116424 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5283#issuecomment-6175116424). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-14T18:12:01Z. --- Checked the DT_NULL stop against the sectionless reader and the gABI; the new test fails on main without the fix and passes with it (import_audit, plus the dependency before DT_NULL is kept). Merging.
adriadam10 commented 2026-10-14 18:14:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T18:14:14Z.


Checked the DT_NULL stop against the sectionless reader and the gABI; the new test fails on main without the fix and passes with it (import_audit, plus the dependency before DT_NULL is kept). Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6175158383 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5283#issuecomment-6175158383). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-14T18:14:14Z. --- Checked the DT_NULL stop against the sectionless reader and the gABI; the new test fails on main without the fix and passes with it (import_audit, plus the dependency before DT_NULL is kept). Merging.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!5283
No description provided.