Skip to content

Conversation

@tnias
Copy link
Contributor

@tnias tnias commented Jan 24, 2026

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).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

This PR is an attempt to revive #4196 and get the feature in.

Parse through .ARM.attributes to find out more more details on the target CPU.
Those details are used to give hints to the disassembler for better results.
Currently only "cortexm" and "v8" are usable hints, so we only extract those.

TODO: some of the uleb128 length stuff is still wrong

Test plan

user@debian:~/rizin$ rz-test test/db/formats/elf/arm 
Running rz-test on linux-x64
Running from /home/user/rizin/test
Loaded 7 tests.
[7/7]                       7 OK      0 BR        0 XX     0 FX
Finished in 0 seconds.
user@debian:~/rizin$

Closing issues

Closes #3747

Each tag's value is defined as a null-terminated string or a
uleb128-encoded number. This info will be required while
searching for "TAG_CPU_ARCH" and "Tag_CPU_ARCH_PROFILE" in
the "ARM_TAG_FILE" sub-subsection.
@tnias tnias force-pushed the arm-elf-attributes branch from c04f545 to ad10993 Compare January 28, 2026 23:46
tnias and others added 2 commits January 29, 2026 02:05
This commit is based on the original PR by Sahil Siddiq.

Co-authored-by: Sahil Siddiq <[email protected]>
@tnias tnias force-pushed the arm-elf-attributes branch from ad10993 to f26bf57 Compare January 29, 2026 01:06
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 64.44444% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.71%. Comparing base (fff40f8) to head (f26bf57).
⚠️ Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
librz/bin/format/elf/elf_info.c 64.44% 30 Missing and 18 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
librz/bin/format/elf/elf_info.c 70.18% <64.44%> (-0.77%) ⬇️

... and 10 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 fff40f8...f26bf57. Read the comment docs.

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

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.

Autodetect asm.cpu whenever possible

3 participants