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

Binary Ninja: Support mixed architectures #112

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

sjossi
Copy link
Contributor

@sjossi sjossi commented Jun 13, 2023

In the Binary Ninja plugin, we now check every function for it's architecture in order to support situations like ARM/Thumb mixed binaries and pull the correct instructions per architecture.

I'm no C++ expert, so I'm not sure if I missed some idiosyncrasies, but I'm happy to fix it up if necessary. I tested the change on a few binaries that I've been working on and they look reasonable.

In the Binary Ninja plugin, we now check every function for it's
architecture in order to support situations like ARM/Thumb mixed
binaries.
@google-cla
Copy link

google-cla bot commented Jun 13, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@cblichmann
Copy link
Member

Thank you for your contribution!
I ran some of our internal C++ tooling to fix formatting and such, but it's otherwise looking good.

After this is merged, I'll need to think about how BinDiff will deal with this. While it only looks at the mnemonics and the structure of the control flow graphs, there might be hash collisions in the instruction mnemonics across different architectures. 🤔

@copybara-service copybara-service bot merged commit 0b57237 into google:main Jun 14, 2023
copybara-service bot pushed a commit that referenced this pull request Jun 20, 2023
The IDA SDK now contains `inf_get_app_bitness()`, which is similar to Binary
Ninja's `Architecture::GetAddressSize()`.

PiperOrigin-RevId: 541844873
Change-Id: Idb9f4feacb5742ca5ff6116107ec3c24fd45b10a
@sjossi sjossi deleted the binja_dual_arch branch October 16, 2023 18:16
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

Successfully merging this pull request may close these issues.

2 participants