From patchwork Sun Apr 19 20:21:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11497907 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B1A0112C for ; Sun, 19 Apr 2020 20:21:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 029422075E for ; Sun, 19 Apr 2020 20:21:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ME82ILm+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725905AbgDSUVp (ORCPT ); Sun, 19 Apr 2020 16:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgDSUVp (ORCPT ); Sun, 19 Apr 2020 16:21:45 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A414BC061A0C; Sun, 19 Apr 2020 13:21:43 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id d17so4007173pgo.0; Sun, 19 Apr 2020 13:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mE8tb2wID6Gq1tu3H9S3tHcs8Ey6O9MmS8FBya2Z96U=; b=ME82ILm+p3oPMG7JB6M9mPlvX5J2E3kS4lcenqA7AoLeFVCmgw23tcwPcBbZiskvuh +Xf//5QbMvo3BIkgu0+7gKjpKFDTxPw24BHbQBuI/20dVuNirUzkSsNWlohfggEWXIwu AqZCD2iPaWAZ1acE2JPXAJdL5+DXz/1I+fBM4z2eZ7tDlDX3iV/IL/kt6e15NPtXEq8B d40hWEeikfZNCJji5QLhygbFAiVLpUWRgMZ6BVrgH6emBDrwyXa0sMk6QII0f3SJYJjV MJc8cc/NaHuss5PKTGA/aWs9UWy5sdEZ+6UtFNH6LYcbtB/G65UfvBGizsLgpu4ihKp0 Snsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mE8tb2wID6Gq1tu3H9S3tHcs8Ey6O9MmS8FBya2Z96U=; b=WuBH0Wa3vDZc4rW29mIuQ5V6APsWnvzXj1wZSwjK2wSILodvsPUictBsQK0wRFBd+k 3b7/zL0m72fqHnDbB6OAuoBhWvPhAOpop3G+VCEJIWlBwgoSH7CFrDlK+sFdWYSdATsZ yTZQR8Zx0pyRLPuLWbtMFrmPHKkRXPil+/d7mmoWC12NWsdpNsBb4YVZTjiIdTb4WRs1 o1e80wxi7QemjJ3ftEJEt+zJ70DRjYC7kka9Chg1imV8mtLg6A7s2lA922NexBzHP77v zJIzZma92z+MpZuUdZn9Pw6eg/u/GKuFAXJMh7xlfrPYkLGGu2zpi8XLRJ1Dr/8MU+Vh GZcA== X-Gm-Message-State: AGi0PubkywyHfdUty30KVt048LOlrGTESI9cgrAs2y6uUNaqvRzIGM+W msRb4HEsN22c3VJ+q40es+Y= X-Google-Smtp-Source: APiQypKMqQbw+p15BuMghL6vVuzujQW+YL/Sh0T4rLJNebDRMm9OYq7hZcAzKng/GEoTVWrIeZ1lZw== X-Received: by 2002:a62:4dc3:: with SMTP id a186mr13921704pfb.40.1587327703004; Sun, 19 Apr 2020 13:21:43 -0700 (PDT) Received: from Ryzen-7-3700X.localdomain ([82.102.31.53]) by smtp.gmail.com with ESMTPSA id s66sm10881010pgb.84.2020.04.19.13.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 13:21:42 -0700 (PDT) From: Nathan Chancellor To: Thomas Bogendoerfer , Masahiro Yamada Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, Nick Desaulniers , Sami Tolvanen , Dmitry Golovin , Sedat Dilek , Nathan Chancellor Subject: [PATCH v2 1/3] kbuild: add CONFIG_LD_IS_LLD Date: Sun, 19 Apr 2020 13:21:26 -0700 Message-Id: <20200419202128.20571-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200419180445.26722-1-natechancellor@gmail.com> References: <20200419180445.26722-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: Sami Tolvanen Similarly to the CC_IS_CLANG config, add LD_IS_LLD to avoid GNU ld specific logic such as ld-version or ld-ifversion and gain the ability to select potential features that depend on the linker at configuration time such as LTO. Signed-off-by: Sami Tolvanen [nc: Reword commit message] Signed-off-by: Nathan Chancellor Acked-by: Masahiro Yamada --- v1 -> v2: * No changes. Sami, please scream if you are unhappy with how I worded this commit. init/Kconfig | 3 +++ 1 file changed, 3 insertions(+) base-commit: 50cc09c18985eacbbd666acfd7be2391394733f5 diff --git a/init/Kconfig b/init/Kconfig index 9e22ee8fbd75..c15ee42b8272 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -23,6 +23,9 @@ config LD_VERSION config CC_IS_CLANG def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) +config LD_IS_LLD + def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD) + config CLANG_VERSION int default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) From patchwork Sun Apr 19 20:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11497915 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD61692C for ; Sun, 19 Apr 2020 20:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4DF92075E for ; Sun, 19 Apr 2020 20:21:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mnAdHYHt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725960AbgDSUVw (ORCPT ); Sun, 19 Apr 2020 16:21:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgDSUVv (ORCPT ); Sun, 19 Apr 2020 16:21:51 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B248CC061A0C; Sun, 19 Apr 2020 13:21:51 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id r14so3923364pfg.2; Sun, 19 Apr 2020 13:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HrfHo3gwGIOtAf36S+sgbFqzxxgJQCzD86LmLZ5F4KY=; b=mnAdHYHtVbPwh95LrWoCAHkezV92Rpj8aT5HWhrXAE0At/B2ugr6R34oNQetPPTOe8 pZhcF3dBjq8ixAj4OveCnNjNE/Jau5UEfkpIwUuMWfjEbF7vahauc25AMRyF4JIeQAyg snhn6U2AVl524MCdmeqhiyAgzQHR6bMcjJGBfzILLNkkZyV4q8DXMzOXs8o/mgh4tAN6 DhWz2MI2iBUUiY3CqUoY7YjFbwHTvsF1EaXk5V0+Wga8jAtGDg8vyBQm3QGrylkdN4Bn NR2d+HAH4ci/NRMDrUyx2r45IDA/IJDKk8MLmS10P6bbpTnk4+Ysj80QRdl5ZUQelxwv F+PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HrfHo3gwGIOtAf36S+sgbFqzxxgJQCzD86LmLZ5F4KY=; b=BzCgI2ojLIlPuvjB9hROhwg3s2v6HpanKBSGWWfHsIcUleHWjIDAJ33abVuBVutaGM pCOPAOXF2/idpo37P6Q5W4p02YPhQ3wf9o08SO0KJ61U3kgA3ki9aT2irZ0e1d4pvOL6 xKfpR33ZbV5J8JWH1ttuoeNpz+3f65hHha0dbZca/291Hfltxm+w5rmMXHHuZEZZBJBf jitDWQPJUdlrLYYcKuv1kQXjV8a4x5mUpWKtKp9BNGPxtu0nA/0LLmhAWqwjPWEy54um CzetKrZrxeWXR9AGFKxn0Kou7E0HwPUx2l+QcjlebrFK2r7BoNCDXGJTEQoYAO2+UpzB Ihxw== X-Gm-Message-State: AGi0PubnJj1hvToemYuKWTHy+wKJOT8M9+we4ISWlrM+91qeY5FG7hTi 3XMwjG7u3Sua3DRuc7a86lo= X-Google-Smtp-Source: APiQypJoaWrd3LmC0rVtZw0OJi/EdE0iPELykqTaptq+/XZ611nc/Ib2kDxcc0vAelDsBiYwFiySTQ== X-Received: by 2002:aa7:9297:: with SMTP id j23mr13072001pfa.15.1587327711147; Sun, 19 Apr 2020 13:21:51 -0700 (PDT) Received: from Ryzen-7-3700X.localdomain ([82.102.31.53]) by smtp.gmail.com with ESMTPSA id s66sm10881010pgb.84.2020.04.19.13.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 13:21:50 -0700 (PDT) From: Nathan Chancellor To: Thomas Bogendoerfer , Masahiro Yamada Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, Nick Desaulniers , Sami Tolvanen , Dmitry Golovin , Sedat Dilek , Nathan Chancellor Subject: [PATCH v2 2/3] MIPS: VDSO: Move disabling the VDSO logic to Kconfig Date: Sun, 19 Apr 2020 13:21:27 -0700 Message-Id: <20200419202128.20571-2-natechancellor@gmail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200419202128.20571-1-natechancellor@gmail.com> References: <20200419180445.26722-1-natechancellor@gmail.com> <20200419202128.20571-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org After commit 9553d16fa671 ("init/kconfig: Add LD_VERSION Kconfig"), we have access to GNU ld's version at configuration time. As a result, we can make it clearer under what configuration circumstances the MIPS VDSO needs to be disabled. This is a prerequisite for getting rid of the MIPS VDSO binutils warning and linking the VDSO when LD is ld.lld. Wrapping the call to ld-ifversion with CONFIG_LD_IS_LLD does not work because the config values are wiped away during 'make clean'. Signed-off-by: Nathan Chancellor --- v1 -> v2: * New patch. arch/mips/Kconfig | 2 ++ arch/mips/vdso/Kconfig | 18 ++++++++++++++++++ arch/mips/vdso/Makefile | 30 ++---------------------------- arch/mips/vdso/vdso.lds.S | 2 +- 4 files changed, 23 insertions(+), 29 deletions(-) create mode 100644 arch/mips/vdso/Kconfig diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 690718b3701a..45220e4b8a65 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -3275,3 +3275,5 @@ endmenu source "drivers/firmware/Kconfig" source "arch/mips/kvm/Kconfig" + +source "arch/mips/vdso/Kconfig" diff --git a/arch/mips/vdso/Kconfig b/arch/mips/vdso/Kconfig new file mode 100644 index 000000000000..36a52158d849 --- /dev/null +++ b/arch/mips/vdso/Kconfig @@ -0,0 +1,18 @@ +# For the pre-R6 code in arch/mips/vdso/vdso.h for locating +# the base address of VDSO, the linker will emit a R_MIPS_PC32 +# relocation in binutils > 2.25 but it will fail with older versions +# because that relocation is not supported for that symbol. As a result +# of which we are forced to disable the VDSO symbols when building +# with < 2.25 binutils on pre-R6 kernels. For more references on why we +# can't use other methods to get the base address of VDSO please refer to +# the comments on that file. +# +# GCC (at least up to version 9.2) appears to emit function calls that make use +# of the GOT when targeting microMIPS, which we can't use in the VDSO due to +# the lack of relocations. As such, we disable the VDSO for microMIPS builds. + +config MIPS_LD_CAN_LINK_VDSO + def_bool LD_VERSION >= 225000000 + +config MIPS_DISABLE_VDSO + def_bool CPU_MICROMIPS || (!CPU_MIPSR6 && !MIPS_LD_CAN_LINK_VDSO) diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile index d7fe8408603e..92b53d1df42c 100644 --- a/arch/mips/vdso/Makefile +++ b/arch/mips/vdso/Makefile @@ -52,37 +52,11 @@ endif CFLAGS_REMOVE_vgettimeofday.o = -pg -DISABLE_VDSO := n - -# -# For the pre-R6 code in arch/mips/vdso/vdso.h for locating -# the base address of VDSO, the linker will emit a R_MIPS_PC32 -# relocation in binutils > 2.25 but it will fail with older versions -# because that relocation is not supported for that symbol. As a result -# of which we are forced to disable the VDSO symbols when building -# with < 2.25 binutils on pre-R6 kernels. For more references on why we -# can't use other methods to get the base address of VDSO please refer to -# the comments on that file. -# -ifndef CONFIG_CPU_MIPSR6 - ifeq ($(call ld-ifversion, -lt, 225000000, y),y) +ifdef CONFIG_MIPS_DISABLE_VDSO + ifndef CONFIG_MIPS_LD_CAN_LINK_VDSO $(warning MIPS VDSO requires binutils >= 2.25) - DISABLE_VDSO := y endif -endif - -# -# GCC (at least up to version 9.2) appears to emit function calls that make use -# of the GOT when targeting microMIPS, which we can't use in the VDSO due to -# the lack of relocations. As such, we disable the VDSO for microMIPS builds. -# -ifdef CONFIG_CPU_MICROMIPS - DISABLE_VDSO := y -endif - -ifeq ($(DISABLE_VDSO),y) obj-vdso-y := $(filter-out vgettimeofday.o, $(obj-vdso-y)) - ccflags-vdso += -DDISABLE_MIPS_VDSO endif # VDSO linker flags. diff --git a/arch/mips/vdso/vdso.lds.S b/arch/mips/vdso/vdso.lds.S index da4627430aba..ffcb5fc12708 100644 --- a/arch/mips/vdso/vdso.lds.S +++ b/arch/mips/vdso/vdso.lds.S @@ -91,7 +91,7 @@ PHDRS VERSION { LINUX_2.6 { -#ifndef DISABLE_MIPS_VDSO +#ifndef CONFIG_DISABLE_MIPS_VDSO global: __vdso_clock_gettime; __vdso_gettimeofday; From patchwork Sun Apr 19 20:21:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11497913 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C085C112C for ; Sun, 19 Apr 2020 20:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7DC62075E for ; Sun, 19 Apr 2020 20:21:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FWvrXP6C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725949AbgDSUVz (ORCPT ); Sun, 19 Apr 2020 16:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgDSUVx (ORCPT ); Sun, 19 Apr 2020 16:21:53 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DB22C061A0C; Sun, 19 Apr 2020 13:21:53 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id w11so3977943pga.12; Sun, 19 Apr 2020 13:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vBTqjGSKxgqxZT9szVE8GVzxQE45UvUGVBjF3adPVE0=; b=FWvrXP6CntvRsYPxzVTzUNRydPoYIZ4A7DdlMX4Ng+XWJDb8L0xAxZMUmQNA1r73cs zOcvGl1RVuumjeJlXrZl2s7zQI2ewF2SCtOEgKVTiDB1T0o7WK8rxQVDg0M6EkNMNhVU LDGt1Sb2FDl6XwLUWRGXtPpklR4K6St5lvDPKjGRyA/8isV5xNpyN6YX0+HPZepQDBSj BmSxrb5brFn1qsYgrpOgG5wyWbJGpBPm9ebC9pkUcMo433rZ5sQVXqWfjkSxzYZp1pY2 IEldluRJe2ADydFFFeR6ZGfV4HeHIHLWD/jkFA9W7Qi3dTBiP7l+1zL4geSNsksXx7Xv uc4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vBTqjGSKxgqxZT9szVE8GVzxQE45UvUGVBjF3adPVE0=; b=gHSSfOHkUDegwS6ZvNBlz6QOUL2k4UFr9ESt7bLebXkNiqs/qO4j3bWFEoJ15B42ZA JLw554ZQAY+2OQp4efLOjw5780BW+LNdKKHEFv5Sy54J47bFZoMHO9MqP+LCk8jO4oC8 KCFy9eSGI8KkpCrM8z5WHBKhEcJ3EVjNdTezBPIPb+7fhBEqzByhgMsJNyBDz4KnVzWd hY/ocabv5CN0h2DH9ui2ao2Ivz3uykI+jq+6M2jCbFoVpSVNnt+k2otqCXGaZ8RIb+ET 4GdS9xxXnG7TDYuoJ0efjs9e6c1uJzhzh1t3P/2SPHVdJywUVRxop6fGt4d2S5AwxK3w zJOw== X-Gm-Message-State: AGi0PuYj42tZdlKbDEorulOwwxi3/tYgb3CArbCSKEgMwTV6j/UsCIPm a7p2/fV4OPeSmtejtOdY0c0= X-Google-Smtp-Source: APiQypIh9o5Ckl/3oHuyQjBPHeJK2UhvKUcM5DWz0EK2eYvUWxfMUgXaS/bAVcUEft80cdh6Xk2kLQ== X-Received: by 2002:aa7:8118:: with SMTP id b24mr1866865pfi.321.1587327713102; Sun, 19 Apr 2020 13:21:53 -0700 (PDT) Received: from Ryzen-7-3700X.localdomain ([82.102.31.53]) by smtp.gmail.com with ESMTPSA id s66sm10881010pgb.84.2020.04.19.13.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 13:21:52 -0700 (PDT) From: Nathan Chancellor To: Thomas Bogendoerfer , Masahiro Yamada Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, Nick Desaulniers , Sami Tolvanen , Dmitry Golovin , Sedat Dilek , Nathan Chancellor Subject: [PATCH v2 3/3] MIPS: VDSO: Allow ld.lld to link the VDSO Date: Sun, 19 Apr 2020 13:21:28 -0700 Message-Id: <20200419202128.20571-3-natechancellor@gmail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200419202128.20571-1-natechancellor@gmail.com> References: <20200419180445.26722-1-natechancellor@gmail.com> <20200419202128.20571-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Currently, when linking with ld.lld, this warning pops up: arch/mips/vdso/Makefile:70: MIPS VDSO requires binutils >= 2.25 CONFIG_LD_VERSION is set with scripts/ld-version.sh, which is specific to GNU ld. It returns 0 for ld.lld so CONFIG_MIPS_LD_CAN_LINK_VDSO does not set. ld.lld has a completely different versioning scheme (as it follows LLVM's versioning) and it does not have the issue mentioned in the comment block so it should be allowed to link the VDSO. With this patch, the VDSO successfully links and shows P_MIPS_PC32 in vgettimeofday.o. $ llvm-objdump -Dr arch/mips/vdso/vgettimeofday.o | grep R_MIPS_PC32 00000024: R_MIPS_PC32 _start 000000b0: R_MIPS_PC32 _start 000002bc: R_MIPS_PC32 _start 0000036c: R_MIPS_PC32 _start 00000468: R_MIPS_PC32 _start Link: https://github.com/ClangBuiltLinux/linux/issues/785 Link: https://github.com/llvm/llvm-project/commit/e364e2e9ce50c12eb2bf093560e1a1a8544d455a Reported-by: Dmitry Golovin Signed-off-by: Nathan Chancellor --- v1 -> v2: * Move into Kconfig so that the warning does not happen. arch/mips/vdso/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/vdso/Kconfig b/arch/mips/vdso/Kconfig index 36a52158d849..7aec721398d5 100644 --- a/arch/mips/vdso/Kconfig +++ b/arch/mips/vdso/Kconfig @@ -12,7 +12,7 @@ # the lack of relocations. As such, we disable the VDSO for microMIPS builds. config MIPS_LD_CAN_LINK_VDSO - def_bool LD_VERSION >= 225000000 + def_bool LD_VERSION >= 225000000 || LD_IS_LLD config MIPS_DISABLE_VDSO def_bool CPU_MICROMIPS || (!CPU_MIPSR6 && !MIPS_LD_CAN_LINK_VDSO)