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

Add tool to display elf metadata from ledger sections #892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cedelavergne-ledger
Copy link
Contributor

Description

This tool will display the following:

$ tools/elf_info.py -i /work/apps/app-cardano/bin/app.elf -v
[INFO] Parsing binary '/work/apps/app-cardano/bin/app.elf'
---
[INFO] app_name:     'Cardano ADA'
[INFO] app_version:  '7.2.2'
[INFO] sdk_graphics: 'nbgl'
---
[INFO] sdk_name:     'ledger-secure-sdk'
[INFO] sdk_version:  'v22.4.0'
[DEBUG] api_level:   '22'
[DEBUG] sdk_hash:    '1838f8b1986a79d77fda95df1fbd9c09aa61ca76'
---
[INFO] target:       'flex'
[INFO] target_id:    '0x33300004'
[INFO] target_name:  'TARGET_FLEX'

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR introduces a new command-line tool for displaying ELF metadata extracted from ledger binary sections.

  • Added a CLI parser to process arguments and set the logging level.
  • Implemented an ELF parsing function to log metadata.
  • Established file accessibility checks before processing the ELF file.

Reviewed Changes

File Description
tools/elf_info.py New tool to display ELF metadata using LedgerBinaryApp

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.02%. Comparing base (eaa7fc3) to head (d35d406).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #892   +/-   ##
=======================================
  Coverage   60.02%   60.02%           
=======================================
  Files          12       12           
  Lines        1736     1736           
=======================================
  Hits         1042     1042           
  Misses        694      694           
Flag Coverage Δ
unittests 60.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This pull request introduces a new command-line tool for displaying metadata from ELF files using Ledger sections.

  • Adds a new Python utility (tools/elf_info.py) that parses ELF files and prints metadata using the logging framework.
  • Implements command-line argument parsing with argparse to toggle logging verbosity.

Reviewed Changes

File Description
tools/elf_info.py New tool created to display ELF metadata from Ledger sections.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants