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

extra info for stripping debug symbols #59

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

Conversation

drmorr0
Copy link

@drmorr0 drmorr0 commented Feb 14, 2024

I don't know if this is of interest in your repo, but given that a) stripping debug symbols is (one of) the best ways to reduce the size of your binary, and b) often you want to keep debug symbols around for, well, debugging purposes, I thought it would maybe be helpful to include a bit of extra context here.

It took me a while to figure this out, because just naively saving the symbols to a second file doesn't work, as noted here but I finally found a post by @p-kraszewski that showed me the magic incantation to get this to work.

Feel free to reject/close/modify if you think this isn't useful!

@johnthagen
Copy link
Owner

@drmorr0 Could you rebase this PR after 2b26a38? That should remove the spurious whitespace changes.

@drmorr0
Copy link
Author

drmorr0 commented Feb 14, 2024

@johnthagen ok, rebased -- it looks like there's still one "space at end of line" change -- I can take that out of this PR if you prefer.

@johnthagen
Copy link
Owner

@drmorr0 Thanks, I fixed that one in 66a1fd9 if you could rebase one more time.

@drmorr0
Copy link
Author

drmorr0 commented Feb 14, 2024

Done!

@johnthagen
Copy link
Owner

@drmorr0 Thank you for bringing this up and the contribution.

My first gut reaction is that this information is a bit too specific for min-sized-rust directly, but since you had a challenge finding this information, I wonder if this does point to a gap in Rust's documentation overall.

My suggestion would be to post on https://internals.rust-lang.org/ and ask what people's thoughts are for where this documentation contribution might be live. Depending on the results of that, we may then add a link to that from min-sized-rust if appropriate.

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

Successfully merging this pull request may close these issues.

None yet

2 participants