Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp993967ybt; Fri, 19 Jun 2020 20:55:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoi8FG2QH4Yr52cm57Z+XVh0tXzA/YGusLyyw6zVmPL/FbJCE2YXbryzjIOAEYKmIcxEiI X-Received: by 2002:a50:ce45:: with SMTP id k5mr6578441edj.80.1592625342409; Fri, 19 Jun 2020 20:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592625342; cv=none; d=google.com; s=arc-20160816; b=mjjKI+uOOO9+hCcwdEZkPb4j8yaen7V8ykJZbLHsv3ixHxc9VWnLB0g01EnyZjVSD8 1yFms49OzJuESqqAoma2A5y91K4FrEWov3qNuo6z8DVbBFBDreq//SOQelaN8a8eXl7L 4iGOrFsYj39hDy6On18gcDj7zSwM8/LeubrpY4gRDU9TgiIkiqv1UUrIxCzACHv2v0Mt SrzMPjHhrJ6D8nOFfXF0wCengBabVp5k4Qk2yvezpjNct5RTcf4cyfNVi0sV9obvjdfH cZ+UE3yUmND6nG7vTQ4TG0ccNR0BOjzYnGCAEywKUtw7ZfWY6ANqMf9Xuq64GWYp8b+F uE3Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m18DJ8qvpeI4oGEyO10/jHpQ0Fx6FO0SqxjPAKlXnE8=; b=fA9ICkZJ3y36ZbiwIracoSrHQstStCZAszwu2paUkwUWeoTRvKFKVbZ3Kxrf3pkKZt tdvSnk1NBqG26cvK3vWQeYsZBV/yYDRNniPPOY8jpbcgPLpLaZ0Y7UIydTV9p7X/uckr 2Hgt82j1Q9lLM7DgVvQpTw924NgM3w1h8JECvxlHQ+yYcKDe5M0VUdBeziSeuh/jSx9/ E7YGRcjoiBOdZ6n56e8ULQU8DwtWIcsif90t6eILofjxhVvHj/luJwycyoU+oUV7V5Jk hhgLOC0UhBlkzu6qSJVraSX3nfKyyF/j2k9jFe/MaYctVQMZp+GK9ppQzmdEk+rK1HOw kVhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KO3bFyGb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qw12si4890870ejb.492.2020.06.19.20.55.20; Fri, 19 Jun 2020 20:55:42 -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=KO3bFyGb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394651AbgFSQZp (ORCPT + 99 others); Fri, 19 Jun 2020 12:25:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:52776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389565AbgFSO5X (ORCPT ); Fri, 19 Jun 2020 10:57:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C9599217D8; Fri, 19 Jun 2020 14:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578643; bh=MdW3KQHJFjrbPO/7LWBN3FFilQj3utVGrULWCGVyXAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KO3bFyGbfQq7kUn5/kMJZogxMzH26iRlIuTf5lbqeVVjAGszF+L3xUw/LK3CVMrQs ryWsuLIzMjqS9Yvs+I61hEGRjqLHIqhvXFUm6Afs1PWbrI1wCvH77PEa7vM3vCuvIc RcBk9pu+JWwNBbiX58AOJWujmCawidYZxwlqy6qs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Peter Collingbourne , Sami Tolvanen , Arnd Bergmann , Fangrui Song , Ard Biesheuvel , Sasha Levin Subject: [PATCH 4.19 101/267] efi/libstub/x86: Work around LLVM ELF quirk build regression Date: Fri, 19 Jun 2020 16:31:26 +0200 Message-Id: <20200619141653.718551571@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141648.840376470@linuxfoundation.org> References: <20200619141648.840376470@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 d9845099635e..d3777d754984 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -28,6 +28,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