From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A429C433E9 for ; Sun, 10 Jan 2021 11:57:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA2082396F for ; Sun, 10 Jan 2021 11:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbhAJL5i (ORCPT ); Sun, 10 Jan 2021 06:57:38 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:28620 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbhAJL5h (ORCPT ); Sun, 10 Jan 2021 06:57:37 -0500 Date: Sun, 10 Jan 2021 11:56:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610279803; bh=RlF1lh7iHyBsNtm+h3Fc1S3Q2TDvtrRsAKToRMl4zRY=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=YhwP9l3YFs/Snyz4zF4eru6TnU1fWkw+3mw05LcJzw+A3v/4q+HzkCZmy+g1nV7lm 7HvbK69qKcd/5KCyoCYYbIt1rGvG52946+v7bWKtgW3nuO35q91Nqzmrb5SavkVYl9 uxvveKgPQvxNkNuxjbo9cODYeRG3vPkqqf+jqScRAM4XRf2y0Aaac0PZgebeBHC57r ywACjMxtw2/JlIfjWxqyizqN/xg6706DNTKmLkOfUwBnMlhun7Ex78fp63/yETFmWv QjfKlkH3bcokvSVNsc41/JjLdqPMSlB8f+SpiSxxlfhYJe3BQ0JvGSy6uo/5Ez0stH WsW13QZyflgYg== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Huacai Chen , Pei Huang , Kees Cook , Alexander Lobakin , Fangrui Song , Jiaxun Yang , Ralf Baechle , Corey Minyard , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, stable@vger.kernel.org, clang-built-linux@googlegroups.com Reply-To: Alexander Lobakin Subject: [PATCH v5 mips-next 6/9] MIPS: vmlinux.lds.S: explicitly declare .got table Message-ID: <20210110115546.30970-6-alobakin@pm.me> In-Reply-To: <20210110115546.30970-1-alobakin@pm.me> References: <20210110115245.30762-1-alobakin@pm.me> <20210110115546.30970-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LLVM stack generates GOT table when building the kernel: ld.lld: warning: :(.got) is being placed in '.got' According to the debug assertions, it's not zero-sized and thus can't be handled the way it's done for x86. Also use the ARM64 path here and place it at the end of .text section. Reported-by: Nathan Chancellor Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor --- arch/mips/kernel/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.= S index 70bba1ff08da..c1c345be04ff 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -68,6 +68,8 @@ SECTIONS =09=09SOFTIRQENTRY_TEXT =09=09*(.fixup) =09=09*(.gnu.warning) +=09=09. =3D ALIGN(16); +=09=09*(.got)=09/* Global offset table */ =09} :text =3D 0 =09_etext =3D .;=09/* End of text section */ =20 --=20 2.30.0