]> git.ipfire.org Git - thirdparty/dracut.git/commit - dracut.sh
feat(dracut.sh): add --aggresive-strip option
authorKairui Song <kasong@tencent.com>
Fri, 7 Jan 2022 06:03:20 +0000 (14:03 +0800)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Wed, 2 Feb 2022 22:59:27 +0000 (22:59 +0000)
commit67fc670a88ab6c97d22c6718082619c0cf850fc3
tree9b31f061913bb729f94901b44fdbc360730f9730
parent22e683077a686b592da55e1d247b31f65c95d481
feat(dracut.sh): add --aggresive-strip option

Dracut currently calls `eu-strip` or `strip` with -g, which only strips
out .debug_* sections. symtab and strtab are kept, but are not required
for runtime, and people will rarely need to do binary level debugging
work in initramfs.

So introduce a --aggresive-strip options, try strip out all sections
that are not required for runtime. This can help reduce the binary size
by a lot.

For example, the size of libc.so is reduced by a lot when stripped
with no option than with -g.

    3014184 libc-2.28.orig.so
    2970920 libc-2.28.strip-g.so
    1460904 libc-2.28.strip.so

Signed-off-by: Kairui Song <kasong@tencent.com>
dracut.sh