From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailapp01.imgtec.com ([195.59.15.196]:53378 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23993045AbcJTU2WpfWSK (ORCPT ); Thu, 20 Oct 2016 22:28:22 +0200 From: Paul Burton Subject: [PATCH 4/6] kbuild: Keep earlycon table through dead code elimination Date: Thu, 20 Oct 2016 21:27:03 +0100 Message-ID: <20161020202705.3783-5-paul.burton@imgtec.com> In-Reply-To: <20161020202705.3783-1-paul.burton@imgtec.com> References: <20161020202705.3783-1-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: linux-mips@linux-mips.org Cc: Ralf Baechle , Nicholas Piggin , Paul Burton Message-ID: <20161020202703.Kros0pr-ek5WEshIVfctB2bKU0vOkuO4dQDyFiYpk1I@z> With CONFIG_LD_DEAD_CODE_DATA_ELIMINATION enabled we must ensure that we keep the earlycon table or we discard all entries leading to no earlycon devices being found. Signed-off-by: Paul Burton Cc: Nicholas Piggin --- include/asm-generic/vmlinux.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index e710593..abe79e3 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -156,7 +156,7 @@ #ifdef CONFIG_SERIAL_EARLYCON #define EARLYCON_TABLE() STRUCT_ALIGN(); \ VMLINUX_SYMBOL(__earlycon_table) = .; \ - *(__earlycon_table) \ + KEEP(*(__earlycon_table)) \ VMLINUX_SYMBOL(__earlycon_table_end) = .; #else #define EARLYCON_TABLE() -- 2.10.0