Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add support for stripped ZTS binaries #451

Open
wants to merge 1 commit into
base: 0.12.x
Choose a base branch
from

Conversation

sj-i
Copy link
Member

@sj-i sj-i commented Apr 6, 2024

This resolves #450 .

Completely WIP, but the POC now works.

ZTS PHP binaries have only small size of the PT_TLS segment as a whole, like 0x13c bytes.

This means that we can search the offset of the actual _tsrm_ls_cache without resolving the symbol by brute forcing the PT_TLS segment. By examining each candidate of the offset by actually trying to resolve EG and see the value of uninitialized_zval and error_zval, and also trying to resolve a global constant like PHP_VERSION, we can assume the candidate is really the offset of _tsrm_ls_cache.
@sj-i sj-i added the enhancement New feature or request label Apr 6, 2024
@sj-i sj-i added this to the 0.12.0 milestone Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support stripped ZTS binaries
1 participant