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 src_to_binary_ext that returns addrs_syms #98

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

ameeuw
Copy link
Contributor

@ameeuw ameeuw commented Mar 30, 2024

This PR adds a src_to_binary_ext function that assembles the binary, collects the addresses of symbols, and returns them.
It also alters the existing src_to_binary function to use it in order to print the addresses of symbols out and only return the binary.

This change was necessary, as I had the requirement to know the addresses of symbols to replace them in resulting code segments, and I think it makes sense to not just print the symbols out but to have them available programatically.

Please let me know if there is any further guideline I should follow to get this PR merged - happy to adjust and collaborate.

Copy link
Collaborator

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, it makes a lot of sense! :-)

Just one minor nitpick: can you please keep the 2 empty lines between toplevel functions?

Looks like we don't have the pep8 style checker active in the CI here, but we try to follow it nevertheless.

Other than that: LGTM!

@ameeuw
Copy link
Contributor Author

ameeuw commented Mar 30, 2024

Thanks for the PR, it makes a lot of sense! :-)

Just one minor nitpick: can you please keep the 2 empty lines between toplevel functions?

Looks like we don't have the pep8 style checker active in the CI here, but we try to follow it nevertheless.

Other than that: LGTM!

Thank you - done.

@wnienhaus wnienhaus merged commit 37e68c5 into micropython:master Apr 4, 2024
1 check passed
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.

None yet

3 participants