Skip to content

Add some missing reloc types #4964

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

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

themadbit
Copy link

@themadbit themadbit commented Mar 5, 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

Added some missing R_386_ reloc types.

Test plan

I'm still figuring out how to write the test for the changes. Some guidance on the same would be appreciated.

Related to #4699

@wargio wargio self-assigned this Mar 5, 2025
@wargio wargio requested a review from notxvilka March 5, 2025 13:45
@notxvilka
Copy link
Contributor

@themadbit see test/db/formats/elf/reloc as an example

@@ -1226,15 +1239,77 @@ static void patch_reloc(struct Elf_(rz_bin_elf_obj_t) * obj, RzBinElfReloc *rel,
}
break;
}
case EM_386:
case EM_386: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Noted. @wargio suggested I work on refactoring the switch cases into static functions to improve readability. I decided to open a different PR that is still in draft as I resolve test errors.

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.

Please don't forget to extract the inner switch into a function

@notxvilka
Copy link
Contributor

Ping?

@notxvilka notxvilka added the waiting-for-author Used to mark PRs where more work is needed label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ELF rz-test RzBin waiting-for-author Used to mark PRs where more work is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants