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

Support showing address in linear view as raw file offset #6279

Open
xusheng6 opened this issue Dec 26, 2024 Discussed in #6278 · 1 comment
Open

Support showing address in linear view as raw file offset #6279

xusheng6 opened this issue Dec 26, 2024 Discussed in #6278 · 1 comment
Labels
Component: UI Issue needs changes to the user interface Effort: Trivial Issue should take < 1 day Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality UI: Linear Issues with the Linear view
Milestone

Comments

@xusheng6
Copy link
Member

Discussed in #6278

Originally posted by FischLu December 26, 2024
I am analyzing a Windows PE file and want to obtain the file offset. I have already adjusted the address display mode to "from file start" in Binary Ninja. However, I noticed that the addresses shown in Binary Ninja are consistently 0xC00 larger than the actual file offsets. After investigating, I found that the .text section does not immediately follow the header; instead, it starts at 0x1000, as shown in the figure.

image

How can I obtain the actual file offsets without manually subtracting 0xC00 each time? Is there a way for the software to handle this automatically? Thank you!

@xusheng6
Copy link
Member Author

Toggling "From File Start" actually does NOT show the raw file offsets (despite the confusing name). It shows the value of current address minus the start of the binary view. In other words, the current address is 0x140001000, and the start of the binary view is 0x140000000. So it shows 0x1000.

IMO the name of the menu entry should probably be renamed to something like "From View Start", and another option, e.g., "From Raw File Start" should be added which does what you wanted

@xusheng6 xusheng6 added this to the Gallifrey milestone Dec 26, 2024
@xusheng6 xusheng6 added Type: Enhancement Issue is a small enhancement to existing functionality Impact: Low Issue is a papercut or has a good, supported workaround Effort: Trivial Issue should take < 1 day Component: UI Issue needs changes to the user interface UI: Linear Issues with the Linear view labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: UI Issue needs changes to the user interface Effort: Trivial Issue should take < 1 day Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality UI: Linear Issues with the Linear view
Projects
None yet
Development

No branches or pull requests

1 participant