From patchwork Thu Jan 7 13:20:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 359725 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, URIBL_BLOCKED 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 ACB35C433E9 for ; Thu, 7 Jan 2021 13:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7305822475 for ; Thu, 7 Jan 2021 13:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728325AbhAGNVe (ORCPT ); Thu, 7 Jan 2021 08:21:34 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:64020 "EHLO mail-40134.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728390AbhAGNVd (ORCPT ); Thu, 7 Jan 2021 08:21:33 -0500 Date: Thu, 07 Jan 2021 13:20:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610025651; bh=9oCj7QKLJWJNGcOnNqI17iIRyczWE6M4kFx9CTLO44o=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=lrLPAOvww0VvEA4BtSTnnUTYtcgzLetcZIBJZI7GJT8o5QacEQyCtZ4AUc6x8k323 jMAKgxOIP62fj4sou0ajm07YYRlfNW0D36sPcxS8N4l1i7zGK+xA6tw6GEFLKtE7l9 zIHmFSEar2TLaHvwmFRtMohUoQFC/j/68PHBVMswYWSIYJ57JpBFWtvGroeUBqL7Qz 9cgckGv6AZjZhxZtQDK7zA0609rtDrXdPmaEq9N8Z6p3pqxbksf3Gycm61TBb4aXPZ guCuLJi8d9Bwh4bS4ApL0AQHSlG8QNR6l8FhH/rJhXAo40NCnfGEkHEUg89uyhEu8c jyYk0VWsux/5g== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Arnd Bergmann , Kees Cook , Nathan Chancellor , Nick Desaulniers , Fangrui Song , Huacai Chen , Pei Huang , Jiaxun Yang , Alexander Lobakin , Sami Tolvanen , Ingo Molnar , 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 v4 mips-next 5/7] MIPS: vmlinux.lds.S: explicitly declare .got table Message-ID: <20210107132010.463129-2-alobakin@pm.me> In-Reply-To: <20210107132010.463129-1-alobakin@pm.me> References: <20210107123331.354075-1-alobakin@pm.me> <20210107132010.463129-1-alobakin@pm.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 same way as .rel.dyn (like it's done for x86). Use the ARM/ARM64 path here and place it at the end of .text section. Reported-by: Nathan Chancellor Signed-off-by: Alexander Lobakin Reviewed-by: Nathan Chancellor --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0f736d60d43e..4709959f6985 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -69,6 +69,7 @@ SECTIONS *(.text.*) *(.fixup) *(.gnu.warning) + *(.got) } :text = 0 _etext = .; /* End of text section */