Skip to content

Strip debug symbols from kernel - #59

Merged
bors[bot] merged 3 commits into
masterfrom
strip-debug
Jun 24, 2019
Merged

Strip debug symbols from kernel#59
bors[bot] merged 3 commits into
masterfrom
strip-debug

Conversation

@phil-opp

Copy link
Copy Markdown
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

bjorn3 commented Jun 23, 2019

Copy link
Copy Markdown
Contributor

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

64 commented Jun 23, 2019

Copy link
Copy Markdown
Contributor

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

bjorn3 commented Jun 23, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Member Author

bors r+

@bors

bors Bot commented Jun 24, 2019

Copy link
Copy Markdown
Contributor

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

bors Bot commented Jun 24, 2019

Copy link
Copy Markdown
Contributor

Build failed

  • rust-osdev.bootloader

@phil-opp

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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

bors Bot commented Jun 24, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

3 participants