From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ard Biesheuvel Subject: [PATCH v2 4/7] arm: compressed: discard ksymtab/kcrctab sections Date: Thu, 29 Jun 2017 08:18:46 +0000 Message-ID: <20170629081849.15081-5-ard.biesheuvel@linaro.org> References: <20170629081849.15081-1-ard.biesheuvel@linaro.org> Return-path: In-Reply-To: <20170629081849.15081-1-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org Cc: matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org, leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Ard Biesheuvel List-Id: linux-efi@vger.kernel.org With UEFI support added to the decompressor, we may end up including C code that is part of the kernel proper, but is rebuilt for the decompressor. This may result in ksymtab/kcrctab metadata being duplicated into the decompressor, so discard such regions explicitly. Cc: Russell King Signed-off-by: Ard Biesheuvel --- arch/arm/boot/compressed/vmlinux.lds.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S index 81c493156ce8..1fa62432e283 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.S +++ b/arch/arm/boot/compressed/vmlinux.lds.S @@ -29,6 +29,11 @@ SECTIONS * of the text/got segments. */ *(.data) + /* + * C code that is shared with the kernel proper (but rebuilt for the + * decompressor) may contain exports that we have no use for here. + */ + *(*ksymtab* *kcrctab*) } . = TEXT_START; -- 2.9.3 From mboxrd@z Thu Jan 1 00:00:00 1970 From: ard.biesheuvel@linaro.org (Ard Biesheuvel) Date: Thu, 29 Jun 2017 08:18:46 +0000 Subject: [PATCH v2 4/7] arm: compressed: discard ksymtab/kcrctab sections In-Reply-To: <20170629081849.15081-1-ard.biesheuvel@linaro.org> References: <20170629081849.15081-1-ard.biesheuvel@linaro.org> Message-ID: <20170629081849.15081-5-ard.biesheuvel@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org With UEFI support added to the decompressor, we may end up including C code that is part of the kernel proper, but is rebuilt for the decompressor. This may result in ksymtab/kcrctab metadata being duplicated into the decompressor, so discard such regions explicitly. Cc: Russell King Signed-off-by: Ard Biesheuvel --- arch/arm/boot/compressed/vmlinux.lds.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S index 81c493156ce8..1fa62432e283 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.S +++ b/arch/arm/boot/compressed/vmlinux.lds.S @@ -29,6 +29,11 @@ SECTIONS * of the text/got segments. */ *(.data) + /* + * C code that is shared with the kernel proper (but rebuilt for the + * decompressor) may contain exports that we have no use for here. + */ + *(*ksymtab* *kcrctab*) } . = TEXT_START; -- 2.9.3