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

Implement RTLD_NEXT #25

Open
duraki opened this issue Mar 16, 2021 · 1 comment
Open

Implement RTLD_NEXT #25

duraki opened this issue Mar 16, 2021 · 1 comment

Comments

@duraki
Copy link
Contributor

duraki commented Mar 16, 2021

RTLD_NEXT is bugged on MacOS 10.15.7//xnu.

cy# RTLD_NEXT
failed to parse cached code for RTLD_NEXT: syntax error, unexpected )
throw new ReferenceError("'RTLD_NEXT' is not defined")

While expected:

Specifies the next object after this one that defines name. This one refers to the object containing the invocation of dlsym(). The next object is the one found upon the application of a load order symbol resolution algorithm (see dlopen()). The next object is either one of global scope (because it was introduced as part of the original process image or because it was added with a dlopen() operation including the RTLD_GLOBAL flag), or is an object that was included in the same dlopen() operation that loaded this one. [1]

[1] https://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_07

So; examine the pointer to RTLD via invoking dlopen on exacta. If next object is visible, report back to user. This way, the dlsym hierarchy would be present.

@NSEcho
Copy link
Contributor

NSEcho commented Mar 16, 2021

I think it should just return the value, like it does for example with RTLD_GLOBAL.

$ ./build/src/cycript
cy# RTLD_GLOBAL
8
cy#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants