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

Exported symbols registered twice for mach-o binaries #4957

Closed
op2786 opened this issue Jan 24, 2024 · 3 comments
Closed

Exported symbols registered twice for mach-o binaries #4957

op2786 opened this issue Jan 24, 2024 · 3 comments
Assignees
Milestone

Comments

@op2786
Copy link
Contributor

op2786 commented Jan 24, 2024

Version and Platform (required):

  • Binary Ninja Version: 3.6.4790-dev, 10b89271
  • OS: macos
  • OS Version: 14.3
  • CPU Architecture: arm64

Bug Description:
Looks like exported symbols registered twice at the same address.

Steps To Reproduce:
Build the file given in the additional information section and check exports.

Screenshots:
Screenshot 2024-01-24 at 10 55 51

Example 2 from binaryninja binary from version 4890-dev:
Screenshot 2024-01-24 at 10 59 46

Additional Information:

#include <stdio.h>

int main() {
    printf("test\n");
    return 0;
}

Build with clang++ test.cpp on arm64 architecture.

@op2786 op2786 changed the title Exported symbols registered twice Exported symbols registered twice for mach-o binaries Jan 24, 2024
@negasora
Copy link
Member

This seems like a regression after #4109 was fixed

@bpotchik
Copy link
Member

The regression is caused by the commit Parse Export Tries in Mach-Os. This commit adds the entire export trie as DataSymbols, even though other symbols for the export may have already been added.

There is a separate issue and commit impacting certain ELF files as well.

@bpotchik bpotchik self-assigned this Jan 24, 2024
@bpotchik bpotchik added this to the Dorsai milestone Jan 24, 2024
@bpotchik
Copy link
Member

Fixed in 3.6.4791-dev

Note that this will be fixed when opening new files, however existing BNDBs will preserve the duplicate symbols.

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

No branches or pull requests

3 participants