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 readelf parsing with more than 100 sections #3

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

Conversation

roccodev
Copy link

@roccodev roccodev commented Feb 9, 2025

This fixes readelf parsing for SDK builds when an ELF has more than 100 sections. I encountered this years ago when trying to get Rust to work on the Pebble: https://github.com/pebble-rust/pebble-rust/blob/master/docs/TROUBLESHOOTING.md

@roccodev roccodev changed the title Fix readelf parsing with more than 99 sections Fix readelf parsing with more than 100 sections Feb 9, 2025
@gmarull
Copy link
Collaborator

gmarull commented Feb 13, 2025

Thanks for your contribution, can you submit a PR to https://github.com/pebble-dev/pebble-firmware ?

@roccodev
Copy link
Author

Sure! See pebble-dev#34

If you don't mind me asking, what is the difference between the two repos?

@WuerfelDev
Copy link

Sure! See pebble-dev#34

If you don't mind me asking, what is the difference between the two repos?

The repo on pebble-dev will hold the upstream source code for pebbleOS. It is maintained by Rebble (the community that formed around pebble).
coredevices is Erics new company which will build the new watches

This fixes readelf parsing for SDK builds when an ELF has more than 100 sections.
The parsing logic previously assumed that section IDs could only go up to 99
(2 digits), this makes it look for a closing bracket instead.
@roccodev roccodev force-pushed the fix/readelf-99-sections branch from 517a549 to 59adb77 Compare February 14, 2025 21:15
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.

3 participants