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

Fix: Seek to entry point by default, if the binary provides one. #5026

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

Rot127
Copy link
Member

@Rot127 Rot127 commented Mar 22, 2025

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).

Detailed description

Required by raw firmware images. They don't necessarily define entry0.
Besides, not taking the entries provided by the loader as default seek is really impolite.
As if rizin.c::main knew it better.

Test plan

All green.

Closing issues

...

@github-actions github-actions bot added the rizin label Mar 22, 2025
@Rot127 Rot127 force-pushed the default-entry branch 3 times, most recently from 1d06560 to ca8b4c9 Compare March 22, 2025 18:44
Copy link
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe extract the find from bin code into a function?

Copy link
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

…provides one.

Required by raw firmware images. They don't necessarily define entry0.
Besides, not considering the entries provided by the loader is really impolite.
As if rizin.c::main knew it better.
@notxvilka notxvilka merged commit 37c1d5d into rizinorg:dev Mar 25, 2025
45 checks passed
@Rot127 Rot127 deleted the default-entry branch March 25, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants