rizin icon indicating copy to clipboard operation
rizin copied to clipboard

add and fix arm32 relocations

Open well-mannered-goat opened this issue 2 months ago • 2 comments

Your checklist for this pull request

  • [x] I've read the guidelines for contributing to this repository.
  • [x] 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 handling for some arm relocations According to this: https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst#relocation-codes-table Since some relocations need GOT table entry for that symbol for calculations and I found out that relocation patching is missing for majority relocations so I would be adding that too.

Test plan

...

Closing issues

closes #5131

well-mannered-goat avatar Oct 13 '25 04:10 well-mannered-goat

ignore the comments for now Some relocation patching is still left especially the ones which have group masking, still trying to understand how those work.

well-mannered-goat avatar Oct 28 '25 04:10 well-mannered-goat

Codecov Report

:x: Patch coverage is 13.04348% with 420 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 46.68%. Comparing base (67dd136) to head (fe111cd). :warning: Report is 97 commits behind head on dev.

Files with missing lines Patch % Lines
librz/bin/format/elf/elf_relocs_patching.c 10.99% 345 Missing and 3 partials :warning:
librz/bin/format/elf/elf_relocs_conversion.c 21.73% 71 Missing and 1 partial :warning:
Additional details and impacted files
Files with missing lines Coverage Δ
librz/bin/format/elf/elf_relocs_conversion.c 19.85% <21.73%> (+1.04%) :arrow_up:
librz/bin/format/elf/elf_relocs_patching.c 27.17% <10.99%> (-5.28%) :arrow_down:

... and 153 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 67dd136...fe111cd. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Oct 28 '25 05:10 codecov[bot]