Repository navigation
fix(relinker): map standalone RELRO in unused import filtering - #4717
Conversation
|
Linux test (Arch, GCC 16.2.1, Release), this PR's head merged alone onto |
7a848dc to
bde680c
Compare
|
Thanks for catching this. I reproduced the failure after rebasing onto current main. The relative-relocation bounds fixture left Fixed in bde680c by initializing both fields. Production validation and the existing bounds assertions remain unchanged. The full Windows relinker build and all 140 CTests now pass. I have not run Linux locally. The earlier 135-test run did include AI-assisted: yes. — Codex |
|
Checked on this head merged onto current |
What
unused-filter=1could not read relocation tables or lifecycle arrays placed in a standalonePT_SCE_RELROsegment, even though the executable reader already maps that segment as a load segment. ReuseElfReader::ReadProgramHeaders()in the relative relocation index and entry-point collector, so filtering uses the same mappings as conversion. Remove the obsolete filter limitation from technical debt.Initialize
e_version=1ande_ehsize=64in the separate relative-relocation bounds fixture. After #4441 added these header checks, that hand-built fixture still left both fields zero; using the shared reader exposed it before its positive bounds assertions. Keep the production header validation and all existing relocation-boundary assertions unchanged.Tested
Windows, MinGW-w64 GCC 15.2.0, Release, relinker-only, main 2a2a3dc. Full build exits 0 and all 140 CTests pass in 24.40 s, including strict_nid_filter, elf_header, elf_reader_bounds, sce_relro, unused_filter_indirect and init_array_roots.
The review-reported failure was reproduced before correcting the fixture: strict_nid_filter exited 1 with
Unsupported ELF object version: expected 1. The original 135-test Windows run included strict_nid_filter, but its base predates #4441's new object-version and header-size guards. Linux execution was not run locally.Before the RELRO mapping fix, the added relocation and lifecycle cases failed with unmapped-address errors. The regressions cover standalone and already-covered RELRO, relocation tables, init arrays and filters 0, 1 and 2; retained imports are checked through the registry.
git diff --checkand committed branch/PR conventions pass. No game or console was run; no performance improvement is claimed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)