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

Strip debug symbols from kernel #59

Merged
merged 3 commits into from Jun 24, 2019
Merged

Strip debug symbols from kernel #59

merged 3 commits into from Jun 24, 2019

Conversation

phil-opp
Copy link
Member

This PR strips debug symbols from the kernel binary to speed up loading. This reduces the boot image size from 5MB to 270KB for blog_os.

(The code already works, I just want to clean it up a bit and improve the naming of the string/path variables before merging.)

cc @64

@bjorn3
Copy link
Contributor

bjorn3 commented Jun 23, 2019

Could you please add an option to disable this. Gdb attached to qemu can load debuginfo too (havent tested, but people say it works)

@64
Copy link
Contributor

64 commented Jun 23, 2019

If done properly, this shouldn't affect debugging with GDB. As I understand it, there'd be two copies of the binary - one with debug info and one without. The bootloader would simply load the one without debug info, but you could just point GDB to the one with debug info and it'd work properly. @bjorn3

@bjorn3
Copy link
Contributor

bjorn3 commented Jun 23, 2019

Thanks @64 I thought the original was stripped in place.

@phil-opp phil-opp changed the title [WIP] Strip debug symbols from kernel Strip debug symbols from kernel Jun 24, 2019
@phil-opp
Copy link
Member Author

Yeah, the original binary is not modified.

phil-opp added a commit that referenced this pull request Jun 24, 2019
@phil-opp
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 24, 2019

Merge conflict (retrying...)

bors bot added a commit that referenced this pull request Jun 24, 2019
59: Strip debug symbols from kernel r=phil-opp a=phil-opp

This PR strips debug symbols from the kernel binary to speed up loading. This reduces the boot image size from 5MB to 270KB for blog_os.

(The code already works, I just want to clean it up a bit and improve the naming of the string/path variables before merging.)

cc @64

Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
@bors
Copy link
Contributor

bors bot commented Jun 24, 2019

Build failed

  • rust-osdev.bootloader

@phil-opp
Copy link
Member Author

phil-opp added a commit that referenced this pull request Jun 24, 2019
@phil-opp
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Jun 24, 2019
59: Strip debug symbols from kernel r=phil-opp a=phil-opp

This PR strips debug symbols from the kernel binary to speed up loading. This reduces the boot image size from 5MB to 270KB for blog_os.

(The code already works, I just want to clean it up a bit and improve the naming of the string/path variables before merging.)

cc @64

Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
@bors
Copy link
Contributor

bors bot commented Jun 24, 2019

Build succeeded

  • rust-osdev.bootloader

@bors bors bot merged commit e536942 into master Jun 24, 2019
@bors bors bot deleted the strip-debug branch June 24, 2019 13:35
@phil-opp
Copy link
Member Author

Published as version 0.6.1

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