Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nimble: strip comment section from binary
After the Zig 0.9.0 release, compiling with the current snapcraft Zig adds 30 KB to the comment section, repeating the clang version many times. Before this commit: $ readelf -p .comment ./configlet String dump of section '.comment': [ 0] clang version 13.0.1 (git@github.com:ziglang/zig-bootstrap.git 74211dd7f7e7174a2027641dfcfdb3fc5df62f0c) [...] (repeat for 30 KB) [ 7969] clang version 13.0.1 (git@github.com:ziglang/zig-bootstrap.git 74211dd7f7e7174a2027641dfcfdb3fc5df62f0c) [ 79d2] Linker: LLD 13.0.1 (git@github.com:ziglang/zig-bootstrap.git 74211dd7f7e7174a2027641dfcfdb3fc5df62f0c) Binary size profile before this commit: FILE SIZE VM SIZE -------------- -------------- 75.2% 368Ki 64.5% 368Ki .text 0.0% 0 19.6% 111Ki .bss 18.2% 89.1Ki 15.6% 89.1Ki .rodata 6.2% 30.6Ki 0.0% 0 .comment 0.2% 816 0.1% 824 .data 0.1% 640 0.0% 0 [ELF Section Headers] 0.1% 392 0.1% 392 [ELF Program Headers] 0.0% 64 0.0% 64 [ELF Header] 0.0% 63 0.0% 0 .shstrtab 0.0% 8 0.0% 8 .got 0.0% 8 0.0% 8 [LOAD #1 [R]] 0.0% 4 0.0% 3 .fini 0.0% 3 0.0% 3 .init 100.0% 489Ki 100.0% 570Ki TOTAL Let's just strip the comment section.
- Loading branch information