Messages in this thread Patch in this message | | | Date | Wed, 19 Feb 2020 16:55:15 -0000 | From | "tip-bot2 for Arvind Sankar" <> | Subject | [tip: x86/boot] x86/boot/compressed: Remove unnecessary sections from bzImage |
| |
The following commit has been merged into the x86/boot branch of tip:
Commit-ID: e11831d0ada3efc7f9268f35c80257f7e1b1dd0c Gitweb: https://git.kernel.org/tip/e11831d0ada3efc7f9268f35c80257f7e1b1dd0c Author: Arvind Sankar <nivedita@alum.mit.edu> AuthorDate: Thu, 09 Jan 2020 10:02:18 -05:00 Committer: Borislav Petkov <bp@suse.de> CommitterDate: Wed, 19 Feb 2020 17:35:30 +01:00
x86/boot/compressed: Remove unnecessary sections from bzImage
Discarding the sections that are unused in the compressed kernel saves about 10 KiB on 32-bit and 6 KiB on 64-bit, mostly from .eh_frame.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20200109150218.16544-2-nivedita@alum.mit.edu --- arch/x86/boot/compressed/vmlinux.lds.S | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S index 508cfa6..12a2060 100644 --- a/arch/x86/boot/compressed/vmlinux.lds.S +++ b/arch/x86/boot/compressed/vmlinux.lds.S @@ -73,4 +73,9 @@ SECTIONS #endif . = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */ _end = .; + + /* Discard all remaining sections */ + /DISCARD/ : { + *(*) + } }
| |