Files
reverse-engineering-anything/docs/specs
0909d89c96 fix(native): list ELF initializers of images with COPY relocations (#10084)
* fix(native): list ELF initializers of images with COPY relocations

inspect-native-initializers reported every init_array and fini_array slot
of a non-PIE executable as unresolved, and ordinary PIE executables as
incomplete, when the image carried a COPY relocation such as the one for
stdout.

The shared dynamic relocation reader had no write extent for COPY or TLS
descriptor relocations, so one such record made pointer coverage unknown.
It now sizes a COPY from the image's own dynamic symbol and a TLS
descriptor as two words. COPY sizes are accepted up to the file byte count
in total, so repeated records cannot multiply consumer work.

The section relocation fallback also treated a record whose destination
has no file bytes, as COPY into .bss does, as an unread table. A linked
image's record now affects only the slots it overlaps in memory.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YT2WLf5G9AnLKF3bZtNLwf

* test(native): cover a COPY relocation against symbol index 0

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YT2WLf5G9AnLKF3bZtNLwf

* fix(native): size section COPY records and keep write extents opt-in

Address two review findings on the COPY relocation change.

The shared dynamic relocation reader yields COPY and TLS descriptor
records as writes only to a consumer that asks for whole extents. The
initializer walk asks. IL2CPP and the Android JNI overlay do not, so
both see these kinds as not decoded, exactly as before this branch.
IL2CPP finds unknown bytes by looking one pointer back from a read, so
a wider write of unknown value was read as stored zeros.

The section fallback takes a COPY record's span from the symbol its
table links to instead of assuming one word. A table counts as not
fully read when that size is not established, or when a record of
unknown extent writes memory that has no file bytes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YT2WLf5G9AnLKF3bZtNLwf

* refactor(native): size section COPY records in one helper

Move the symbol lookup, the allowance and the unread-table note out of
the record loop, so the loop only asks for the extent a record is known
to write. Behavior is unchanged.

Cover the allowance across two section records, and keep the new test
code within the lint thresholds the base already meets.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YT2WLf5G9AnLKF3bZtNLwf

---------

Co-authored-by: thunderq10 <195775442+thunderq10@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 23:49:30 +08:00
..

Feature specifications

This directory indexes proposals and implementation records. It is not a catalog of current capabilities; use the documentation directory for current guides. Preserve original requirements and dated verification evidence when later increments change behavior.

New feature directories use one spec.md, one plan.md and one tasks.md. Some historical records have fewer artifacts; their presence or absence does not establish completion. Do not invent past plans or completed tasks to fill gaps. Follow documentation ownership and authoring for new work, roadmap granularity and producer-owned contracts.

Environment roadmaps

Other feature records