Repository navigation
Conversation
|
Regarding the overlap warning: #2001 deletes Fresh, serial relinker-only Release tests on Zorin OS 18.1 x86-64 / GCC 13.3: PR head 39/39 passed (6.32 s); exact base |
|
Closing: no title is shown with a second |
|
Understood. The synthetic tests do not establish a title whose conversion fails because of this metadata. Rejecting identical duplicates could also reject input the console accepts; the tests do not establish compatibility. I have no affected-title evidence supporting this change and accept keeping the PR closed. AI-assisted review and reply. |
…pipeline reads getTagValue returned the first entry of a dynamic tag, so an executable with DT_RELASZ 0 followed by DT_RELASZ 24 converted for Linux with exit 0 and an output without DT_RELA, while the reverse order kept the relocation. getTagValue now scans every entry and throws "Conflicting duplicate <NAME> tags" when a tag it is asked for repeats with a different value, the rule RelativeRelocationIndex already applies with unused-filter=1. The pipeline check accepts a repeat with the same value: it is not ambiguous, and #1938, which rejected it, was closed because no title was shown and because rejecting it could refuse an input the console loads. The code analysis on Windows and macOS and the strict filter keep their own duplicate checks. Inputs without such a conflict convert as before, and an input with one now fails with the same message on every target.
What
The main relinker reads the first
PT_DYNAMICheader and the first occurrence of consumed table metadata. A second header is ignored on Linux, while conflicting relocation tags can select different tables in the pipeline and strict reachability's relative-relocation index. Windows detects some duplicates later, after an optional import registry has been written. Reject multiple dynamic headers before reading the dynamic table, and reject a repeated tag when the pipeline consumes its value, before either output patcher runs.Identical duplicates are rejected too. This is AnyPS5's supported-input policy, consistent with the bundled-module reader's duplicate guards; it is not a claim that the ELF gABI requires every dynamic header or tag to be unique. The tag guard covers only the 11 currently consumed standard/SCE pairs for string, symbol, RELA and PLT table addresses, sizes, strides and type.
DT_NEEDED, distinct SCE module-import records and ignored tags retain their existing behavior. Other tags, including the existingDT_INITambiguity, are outside this change. Existing OS-versus-standard ambiguity diagnostics remain intact.Extend
dynamic_segmentwith the same, different, empty and out-of-bounds second table in both header orders. Registerdynamic_tag_duplicatesfor identical and conflicting values in both tag orders and both tag families. Every duplicate rejection must return status 2, identify the duplicate, and create neither an executable nor an import registry. Valid controls include trailing records afterDT_NULL, repeatable imports, and outputDT_NEEDEDorder in bothlibA.so, libB.soand reverse lexicallibB.so, libA.soorder. Tests use synthetic input and generate both Linux ELF and Windows PE output.Tested
The duplicate-header and duplicate-tag regressions fail against base f145139 and pass with this patch. Reverse lexical DT_NEEDED order passes without sorting the dependencies. Zorin OS 18.1 x86-64, GCC 13.3.0, Python 3.12 and CMake 3.28.3, relinker-only Release/static, one build job. Author validation of the composed four patches passed all 39 configured CTest registrations in 6.06 s, including progress_report and import_audit; exact-base baseline passed 38/38 in 5.93 s. A separate independent review rebuilt the composed revision and passed 39/39 in 6.03 s. Focused baseline and patched checks use small synthetic inputs. Existing assertions are retained; no real game, firmware, private asset or GPU input was used.
No native Windows or macOS runtime, real title, firmware, private asset or GPU input was tested. Windows PE generation on Linux is structural coverage. No cross-PR merge or runtime validation is claimed.
Checklist
f145139676a48306681d3a4d5fabf83938759daf; the 2026-10-09 overlap audit found no equivalent implementationOpen PRs #1272, #1446, #1617 and #1690 share
RelinkerPipeline.cppfor other work. #1690 and #1913 also change test registration. A fresh overlap check found no equivalent open implementation. No functional dependency on those PRs.