Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1594217pxb; Sun, 10 Jan 2021 03:59:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqRz+XkfbHztLqRI7RM2WUAXn4NtMjTX7jFdPDnFTKtjHCdstgvGTsDOJI3AgpTDohSQg5 X-Received: by 2002:a17:906:b217:: with SMTP id p23mr7811894ejz.461.1610279979149; Sun, 10 Jan 2021 03:59:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610279979; cv=none; d=google.com; s=arc-20160816; b=dwgRKVZHd7JfDtMI/2XF6+DsFzwfer8rxhDjaGm4/aV86wj7RJbXACEwI8IiC7vPSD fisQ4e1qXvIiEsMuXKqahfUFS1zEOvApVJG6TPNjHvsT7QK7xrnsCLUj8M0fW9fkQii3 1jx1KoSfNDJ463WQs1kIdorj/pHa2p0PokkpgdzwYpSZkL1egfsG3YN+E+iUb4LXMWsI ltyOm+vM9qQ0MaQofne4ZjN0w68AKoqTWyquyDQnfrU/AuMHx9BBDag3WlevdqTgRwQA Y8xuaBBunXxzWeP4HXn1rxM4vSX4daOIDpFdgEs/WBpLdvGuGW3M+YBCTJeUxyDiO8hC /TQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=RlF1lh7iHyBsNtm+h3Fc1S3Q2TDvtrRsAKToRMl4zRY=; b=0Owfzu1x5hsBVERNiY+Qud3hGaJOvNgmcdx/QM80XzkM8AJ4oe+6jBXIJV81RjPC7h VPGcojutKeLIRJyWg3LBHpEWjpOpTwYjELcM4rauLf9QdhZKuPrY0MfK/GZrNTwhtLTO dN6sfwS6EEMwkH7QMBEC64bbGD7+7FNvTstQsDU3++6v9ZSkD9zRJwGgdAMt8+T4Rf29 hhj732VsbBhiyuBSZ7X3iWUsDBJfbWmv+G3KaI9nPPFJxuDucb4tpJ/K5HjEV4uzLx+b Zjf3/FS4HoNIk1eDJ5JLSgBTbsNplyISBuoUUvR9Di+2G2T7BmRY5sV7Wb7HvOFI1TtV a7mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=YhwP9l3Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si5898807edq.414.2021.01.10.03.59.16; Sun, 10 Jan 2021 03:59:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=YhwP9l3Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbhAJL5i (ORCPT + 99 others); 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 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch 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