diff --git a/arch/aarch64/linker.lds.S b/arch/aarch64/linker.lds.S index 30de9b0..3bd6a8f 100644 --- a/arch/aarch64/linker.lds.S +++ b/arch/aarch64/linker.lds.S @@ -89,4 +89,14 @@ SECTIONS #ifdef CONFIG_LINUX_KRNL_HEADER_IMG _kernel_size = _stack_end - _start; #endif + + /* size optimization for flat binaries */ + /DISCARD/ : { + *(.eh_frame) + *(.eh_frame.*) + *(.note.gnu.property) + *(.note.gnu.build-id) + *(.comment) + *(.ARM.attributes) + } } diff --git a/arch/arm/linker.lds.S b/arch/arm/linker.lds.S index bd415d4..507c34f 100644 --- a/arch/arm/linker.lds.S +++ b/arch/arm/linker.lds.S @@ -45,4 +45,14 @@ SECTIONS } _end = .; + + /* size optimization for flat binaries. */ + /DISCARD/ : { + *(.eh_frame) + *(.eh_frame.*) + *(.note.gnu.property) + *(.note.gnu.build-id) + *(.comment) + *(.ARM.attributes) + } }