From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS Date: Mon, 22 Jun 2020 13:53:39 -0700 Message-ID: <20200622205341.2987797-2-keescook@chromium.org> References: <20200622205341.2987797-1-keescook@chromium.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20200622205341.2987797-1-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org To: Borislav Petkov Cc: Kees Cook , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Arnd Bergmann , Nick Desaulniers , Nathan Chancellor , clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-arch.vger.kernel.org For vmlinux linking, no architecture uses the .gnu.version* section, so remove it via the common DISCARDS macro in preparation for adding --orphan-handling=warn more widely. Signed-off-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..6fbe9ed10cdb 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -934,6 +934,7 @@ *(.discard) \ *(.discard.*) \ *(.modinfo) \ + *(.gnu.version*) \ } /** -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728421AbgFVUxs (ORCPT ); Mon, 22 Jun 2020 16:53:48 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04AABC061573 for ; Mon, 22 Jun 2020 13:53:48 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id u14so424783pjj.2 for ; Mon, 22 Jun 2020 13:53:47 -0700 (PDT) From: Kees Cook Subject: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS Date: Mon, 22 Jun 2020 13:53:39 -0700 Message-ID: <20200622205341.2987797-2-keescook@chromium.org> In-Reply-To: <20200622205341.2987797-1-keescook@chromium.org> References: <20200622205341.2987797-1-keescook@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Borislav Petkov Cc: Kees Cook , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Arnd Bergmann , Nick Desaulniers , Nathan Chancellor , clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20200622205339.w0-gGBcewNLwpPPNPodd19JxIyerpjl8DN8a_sloCBA@z> For vmlinux linking, no architecture uses the .gnu.version* section, so remove it via the common DISCARDS macro in preparation for adding --orphan-handling=warn more widely. Signed-off-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7..6fbe9ed10cdb 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -934,6 +934,7 @@ *(.discard) \ *(.discard.*) \ *(.modinfo) \ + *(.gnu.version*) \ } /** -- 2.25.1