From patchwork Fri Feb 26 14:03:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12106721 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 3F653C433E0 for ; Fri, 26 Feb 2021 14:06:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D76A164E54 for ; Fri, 26 Feb 2021 14:06:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D76A164E54 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=SnpvaNvXJ2JDMos4ToHPMEu2cZb8kIUxcR2lZyMAMOI=; b=BjTFJu61mWYr/tfNXqNl8W9/zc XIBcE6CS5Kkr1DxVSiQFa1wg7VjV2/jECPdzNj+q8wjhnl76seYcKB0ZyfNDaAGsRwVNtdwsSL1lV 8KWjAsal1s4P1b1ut8Q7aXNloij0Exoi0ZjjBzzn8sTc3zk6C5sYx2nSMMBXRB/h6NQ2+Iucpk2Sq tKjMmYPEMe15SGjeahmysFiQtO/uOBFvUtTbrnxFfIlYKndocXNJXhciUJpuloumwj3TJRPR1j9zh Z0NMtrPFbp4tsbXSj/y1r5+vO8e3OmkRX0Xrol+vZw8J9SSXb/E3bYPlldytCk8OgjgtVLvsn/Qko gK1FSsgw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFdkJ-0004jo-KP; Fri, 26 Feb 2021 14:05:31 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFdjH-0004DO-AE for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2021 14:04:30 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7760564EF0; Fri, 26 Feb 2021 14:04:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614348266; bh=BLWeBOVF8W7renKagiVmUVTYjOP+aHJuqtrmyXlTh8U=; h=From:To:Cc:Subject:Date:From; b=ek7vXs+5VSbdLxV2e0+0bZQl7i7ZSgjFRndDVC6Y03eE+IjkKRMzeFH4oxuK9T8F1 LW/fERlBz4Vn9aMBg4kAV5FOl795O04gJ5bx7ENRVhlIvscXhGojmisg9gzmZVyI0O vfUsL6msaEj0pfG268TePa0B06EM/g6yayoYh/I68Gm/8boIIwqhoNVYy5r6HEuhrT ZcNLmrDB67t70FawNvVSiEBAb8bJGemvBkvYv4ctr7ZBvwhJL8iyqi237erv7oK2J0 VXSNmFyyUjw2zWBRVM9kgzOsPJEBPzoZDFl/E66OnzxJ+FdcjpQyVScNi8G9Oit16e jxk4TyQj6TU2w== From: Arnd Bergmann To: Catalin Marinas , Will Deacon Subject: [PATCH] arm64: vmlinux.lds.S: keep .entry.tramp.text section Date: Fri, 26 Feb 2021 15:03:39 +0100 Message-Id: <20210226140352.3477860-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210226_090427_509960_F6BA25A4 X-CRM114-Status: GOOD ( 13.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kees Cook , Arnd Bergmann , Marc Zyngier , linux-kernel@vger.kernel.org, David Brazdil , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann When building with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION, I sometimes see an assertion ld.lld: error: Entry trampoline text too big This happens when any reference to the trampoline is discarded at link time. Marking the section as KEEP() avoids the assertion, but I have not figured out whether this is the correct solution for the underlying problem. Signed-off-by: Arnd Bergmann Reviewed-by: Kees Cook Reviewed-by: Fangrui Song --- arch/arm64/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 926cdb597a45..c5ee9d5842db 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -96,7 +96,7 @@ jiffies = jiffies_64; #define TRAMP_TEXT \ . = ALIGN(PAGE_SIZE); \ __entry_tramp_text_start = .; \ - *(.entry.tramp.text) \ + KEEP(*(.entry.tramp.text)) \ . = ALIGN(PAGE_SIZE); \ __entry_tramp_text_end = .; #else