Vector35 / Vector35/binaryninja-api
Importing headers does not match functions with mangled names
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
What is the feature you'd like to have?
It should be possible to import headers and have the imported functions match the exported symbols when there is a proceeding underscore prefix in the function symbol as that is what would be expected.
This can optionally be controlled by a checkbox on the import headers screen ("Match with C symbol names for functions")
Is your feature request related to a problem?
Importing a header to match function signatures only works if the function name is exactly the same as the Clang discovered function. This can be overcome by renaming all functions prior to importing headers.
Are any alternative solutions acceptable?
Using the API to remove the underscore from function imports.
Additional Information:
This comes from attempting to import the objc/runtime.h file to provide better type information to extern symbols. It fails to match any of the functions as objc_msgSend is imported as _objc_msgSend and therefore do not match.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the import headers screen and the header-import matching path, using objc/runtime.h and the objc_msgSend/_objc_msgSend mismatch as the reproduction. Check the available API alternative for removing the underscore, then define done as imported functions matching exported symbols, with the optional checkbox behavior covered if implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100