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

Do a better job of filtering Mach-O symbol tables #13

Open
woodruffw opened this issue Oct 5, 2022 · 1 comment · Fixed by #16
Open

Do a better job of filtering Mach-O symbol tables #13

woodruffw opened this issue Oct 5, 2022 · 1 comment · Fixed by #16
Assignees
Labels
C:core Core functionality enhancement New feature or request

Comments

@woodruffw
Copy link
Member

Symbol tables in Mach-Os can contain all kinds of junk, including symbolic debug entries and entries without actual names. This can result in a lot of unnecessary work, since we end up scanning symbols that don't actually correspond to the CPython ABI being linked against.

The solution here is to filter the symbol table, and only audit symbols that correspond to function or data entries and that are marked as "undefined" (meaning external, not local).

@woodruffw woodruffw self-assigned this Oct 5, 2022
@woodruffw woodruffw added enhancement New feature or request C:core Core functionality labels Oct 6, 2022
@woodruffw woodruffw reopened this Oct 6, 2022
@woodruffw
Copy link
Member Author

Thinking about this more, I'm not as confident this is correct: we want to catch CPython extensions that have non-abi3 APIs inlined into them, and filtering non-external functions will prematurely exclude those.

The more correct thing to do here is to filter out anything that doesn't resemble a function or data object, not all non-externals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:core Core functionality enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant