Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp258260ybj; Fri, 8 May 2020 11:05:58 -0700 (PDT) X-Google-Smtp-Source: APiQypKg8gvdSVR6vAfGRaRhZsbPZbr6N6xPd8VlGA4dc2OeBzK0IGuLHPrb+/EEY5LDniiX7rsk X-Received: by 2002:a17:906:d299:: with SMTP id ay25mr3037640ejb.348.1588961158430; Fri, 08 May 2020 11:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588961158; cv=none; d=google.com; s=arc-20160816; b=dzedQ72fCz3zyqleEtnIuUu3JM+Se0/EOsoSblb82Lhz63a3Glw6hbE7K93HFe0ukh oUd0o+wNp2orvcw8mnweVjHJQtYevxYvP2FPnN0GL6ZhagHXj5YiEPaDd4OwPun0+6Zd BpEIgqV+8CO38EYPmsGLvIPgQTrulxGxkLFycJZqb+Mw2mSh2BAuhN0Lku//Epoq6BPa NVIay0lJq2J0vk3gQrd4GOkdbFsxH4bxTiEtEMoRU0is5zuBgFHP6F2+YamPNQSo9/sz 5NjBeRWLbE7Xk1SrNkiiS+DFHuPU/hPQxil9+QX132sTaLuAtbQTAgOVxTkSrz5RpyVo c1pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=iVOtyIW6NoT/5gA7RXK6OxiscgtT2y2RG+ESKXnF1FA=; b=UU2bR7SG9WITMynJlaBkyCUeodmVT4aF2Vm6wLpzV76UeuhiIgmCTMWjwGkboGXiIG tqCH43DUKx2FB9ZCay6HlLlafM/ZbjmTt3FpuUzvQyYOPiUEEh1oiUusuk0cR3iVnHnN RPlEp9nf3nR0QB3JZOEFrqNycOH3HNxsuv1wun5bmNf+9rUPRUTdy/eU9Sq3MA+T86Hr jEWnMN/0RMuu7Lnb41vZ6tnyJudJjWYLfB/DxdLIdwvR2+yGg8DhECA5cR0jJC4Xu8V4 Y9zG/Z4PoqoCihP55QrM5VWgDQkBB7t7JcpXkiQc01BV8wH/pPdnYXRABbPFrgXWWc5M Oepg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IXM4t75J; 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 lw9si1302727ejb.175.2020.05.08.11.05.28; Fri, 08 May 2020 11:05:58 -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=IXM4t75J; 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 S1728081AbgEHSC4 (ORCPT + 99 others); Fri, 8 May 2020 14:02:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:48430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728060AbgEHSCz (ORCPT ); Fri, 8 May 2020 14:02:55 -0400 Received: from e123331-lin.nice.arm.com (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (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 761DE24972; Fri, 8 May 2020 18:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588960975; bh=0UX/KE5NPn6JSiA254bGg/BusFMtpcXn/r1pNYgqK6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IXM4t75JqlaHiuFtBGFnYCJhAOG3cXnRftl3lC0d1wkSrTcSK1NPlvTuTP6RuRoKx PoUquoGe81LiZsJai7SUnr3VcKhV8MsnyLAeew1pk1XOHZRmiO940szHkL7uqb0m6X DE2lNg8X5w/xStFsNyV5uF+VfuiBSVBgaommgppE= From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Arnd Bergmann , Arvind Sankar , Guenter Roeck , Joe Perches , Nick Desaulniers , Peter Collingbourne , Sami Tolvanen Subject: [PATCH 13/15] efi/libstub/x86: Work around LLVM ELF quirk build regression Date: Fri, 8 May 2020 20:01:55 +0200 Message-Id: <20200508180157.1816-14-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508180157.1816-1-ardb@kernel.org> References: <20200508180157.1816-1-ardb@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 8d246b51bd49..e5a49dc8e9bc 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.17.1