Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821AbdCAQo7 convert rfc822-to-8bit (ORCPT ); Wed, 1 Mar 2017 11:44:59 -0500 Received: from terminus.zytor.com ([65.50.211.136]:43960 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbdCAQo5 (ORCPT ); Wed, 1 Mar 2017 11:44:57 -0500 Date: Wed, 01 Mar 2017 08:44:38 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <863b50ccad9182c0529c63b0ae7bceb3b3fafc69.1488380822.git.jpoimboe@redhat.com> References: <863b50ccad9182c0529c63b0ae7bceb3b3fafc69.1488380822.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH] objtool, module: discard __unreachable section for modules To: Josh Poimboeuf , Ingo Molnar CC: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Jessica Yu From: hpa@zytor.com Message-ID: <9593504E-702C-4ABC-A72A-FAF77999B707@zytor.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1080 Lines: 31 On March 1, 2017 7:20:03 AM PST, Josh Poimboeuf wrote: >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+*)) } I would like to see a name like, say, ".annot.unreachable", since is odds are pretty high we are going to need more annotations in the future. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.