Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbdCAPVt (ORCPT ); Wed, 1 Mar 2017 10:21:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40008 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbdCAPVs (ORCPT ); Wed, 1 Mar 2017 10:21:48 -0500 From: Josh Poimboeuf To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , "H . Peter Anvin" , Jessica Yu Subject: [PATCH] objtool, module: discard __unreachable section for modules Date: Wed, 1 Mar 2017 09:20:03 -0600 Message-Id: <863b50ccad9182c0529c63b0ae7bceb3b3fafc69.1488380822.git.jpoimboe@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 01 Mar 2017 15:20:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 770 Lines: 27 The __unreachable section is only used at compile time. It's discarded for vmlinux but it should also be discarded for modules. Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends") Signed-off-by: Josh Poimboeuf --- scripts/module-common.lds | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/module-common.lds b/scripts/module-common.lds index 73a2c7d..936a3c6 100644 --- a/scripts/module-common.lds +++ b/scripts/module-common.lds @@ -4,7 +4,10 @@ * combine them automatically. */ SECTIONS { - /DISCARD/ : { *(.discard) } + /DISCARD/ : { + *(.discard) + *(__unreachable) + } __ksymtab 0 : { *(SORT(___ksymtab+*)) } __ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) } -- 2.7.4