Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp119453ybg; Mon, 8 Jun 2020 18:09:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGifCVC+tLVvLDwuZMMvNxRzSB6vxMhJSpvjnOZz4OdrNUNmCBVXeWRguXPHLPF2fHSbvM X-Received: by 2002:a17:906:1088:: with SMTP id u8mr16989447eju.428.1591664953944; Mon, 08 Jun 2020 18:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664953; cv=none; d=google.com; s=arc-20160816; b=OzMz/NlUVSd4pZGk2o+Wrudb1OYXY3drdU6tzq22uFJlBU4SNYuHMUcPLhdhyfErPC shLvUH/UafP83zE31ake/L05W1NpMb7+tpSE8zT1DYxzeqPFspfNjevcTw6euRSHrAGw Cdml0trBLYXvQyGZRMBBHsUEG6m8UB2lxohU1Np7WAi3l+yVdtuftb3mYee+IhsSxSRE 1FRvmQETAGBIDQHWeSN0yiVNLxiMuraO0A1liYJuHbX8oE8oiZGSWz7alE/rtESxm+o+ G2RCsjRFYiI++jU6/D95OW/JWcVeBJ8TzDgHoAt5stNh4zYDxXHanUooS9aUsTE/SrY5 VlpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xey+IU6pYbD4cOLOq5KVNPYnQODd/Z+qrfVACAakHl4=; b=vpNdwg8uDzl9+4xpkZyiKW9mhim0fVQl4qPH6MIc95tg2fWWtHNd5tz53jJzOxFz6a YNcZNcReAagcFYrKSe03zf4n5nNFlZLJk1RHOiKfyYe4NgOVVxIHovGVOlE+2P41+3xY wmMcTbub9+L5mZAJ6BwVMedKq9EmJbr3gdk3Fqx1GXfy0BnYUSABJ2LsPcdKs5Kwn7ea szham+QKLH39XAouSmos2kjiJt5uCK7Zyg7XduS/0v3GI2m9+0LrGynyOGKHRp6an7EK iAd2JjS4S4OGovYigQIdgDCmdgM/YcwU9vemQSnfalrkXlt2kfdLH6tQtG501f+k58hS ajUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oKcy2C9B; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c5si1833134edr.388.2020.06.08.18.08.50; Mon, 08 Jun 2020 18:09:13 -0700 (PDT) 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=@kernel.org header.s=default header.b=oKcy2C9B; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727863AbgFHXHW (ORCPT + 99 others); Mon, 8 Jun 2020 19:07:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:50164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727065AbgFHXGq (ORCPT ); Mon, 8 Jun 2020 19:06:46 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 56F8120820; Mon, 8 Jun 2020 23:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657605; bh=B3xFYh7AMdy6830NHmMW9gIz6XlazHF4qwfRiP3z9Wo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oKcy2C9BkzC6s21iJyLzYHi6LDHVpBHzYXsesCn/x0B6w5Pafg+wo6zGfhG5Nz2tD zIQqnhqsp1OaAgKysJkfmyzT+Eni5CGqfAAc+wXOJ8X0FB6IU7R3hKbaa8CAZMEFGA 2+2zVjrbdLg4UJLqxTkVWXg9fFUp4lVtyaVs9KmA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ard Biesheuvel , Nick Desaulniers , Peter Collingbourne , Sami Tolvanen , Arnd Bergmann , Fangrui Song , Sasha Levin , linux-efi@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 5.7 030/274] efi/libstub/x86: Work around LLVM ELF quirk build regression Date: Mon, 8 Jun 2020 19:02:03 -0400 Message-Id: <20200608230607.3361041-30-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel [ Upstream commit f77767ed5f4d398b29119563155e4ece2dfeee13 ] When building the x86 EFI stub with Clang, the libstub Makefile rules that manipulate the ELF object files may throw an error like: STUBCPY drivers/firmware/efi/libstub/efi-stub-helper.stub.o strip: drivers/firmware/efi/libstub/efi-stub-helper.stub.o: Failed to find link section for section 10 objcopy: drivers/firmware/efi/libstub/efi-stub-helper.stub.o: Failed to find link section for section 10 This is the result of a LLVM feature [0] where symbol references are stored in a LLVM specific .llvm_addrsig section in a non-transparent way, causing generic ELF tools such as strip or objcopy to choke on them. So force the compiler not to emit these sections, by passing the appropriate command line option. [0] https://sourceware.org/bugzilla/show_bug.cgi?id=23817 Cc: Nick Desaulniers Cc: Peter Collingbourne Cc: Sami Tolvanen Reported-by: Arnd Bergmann Suggested-by: Fangrui Song Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin --- drivers/firmware/efi/libstub/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 094eabdecfe6..d85016553f14 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -30,6 +30,7 @@ KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ -D__NO_FORTIFY \ $(call cc-option,-ffreestanding) \ $(call cc-option,-fno-stack-protector) \ + $(call cc-option,-fno-addrsig) \ -D__DISABLE_EXPORTS GCOV_PROFILE := n -- 2.25.1