Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1236930pxb; Fri, 26 Feb 2021 06:10:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJywHceg135ruB4yIR2yS1H3zw6NM8HrnIa7SjAmjjBRzGV3j26wmPY9vxgkfy8gJ5GjGuM9 X-Received: by 2002:a17:906:3850:: with SMTP id w16mr3688560ejc.286.1614348602712; Fri, 26 Feb 2021 06:10:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614348602; cv=none; d=google.com; s=arc-20160816; b=RadYIMZlvO1x9NeMUAYhZCuj7vvLSNfvnMwO+AzIJKp9ODUnd+B1xKW+TXnyudPkGC 2fRQOC42BxCCSwagPNn/ePjxl6gRlaaFX1IA/cyGw/XAJEczoOCCIVegeSBeEL6tc7Jq 8WjKoCMFcp2VlB2+oWdgQoR+NK5X/MbLZFxT5dpdeO/9yRfnTsXxYWuN34sHO/7a+Hj4 0I39bWB9uLi7WTEN1JqP2eZ1xVsIJkiZg/Oft1he2x1jCIQHldtwiwp3xYmhOhUOFHj4 9aCDluU6JmIvN+mN9eqnj1d14Gl4yJ4WVmn6ZirFmxyuhxk6vueCPrTTSHtxdnzn049y lhMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QYTc70myMp2EX9tL9zNYHIGSD1t8FxZeZdA9xhXDUvo=; b=gNWsJOxavNl/DZyw3ugvyuaTR7A+KyS1mOK2ojI9/soGg6J024h2Ro4DlIIlBMWt+Q cYN+PtLwgV+aGJacVsES/Ukz7mr5kIgqmt0NOxWAeyFDLBUBXbc8VU0NXkmmI3cZYkYz XS9XIgXLVkJ3Fj2AZt2IjYN+4t4mgfFubotXKIgd71ZPGuALQW43iyxS683EcJcuSemW ahd83adEygnlxVaWW/5icyQoX0plbmY/Z32JzM249NXauXq4rN30tGgpH18xtxHA4yjB tCtwz2VCMdWEBsCXiAHItIJjOVl44PtfbI3gr3eQR1Xm+gW2k5g2Xiz1H7iZsJN36O3P yAjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ek7vXs+5; 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 r15si6297393edb.401.2021.02.26.06.09.37; Fri, 26 Feb 2021 06:10:02 -0800 (PST) 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=k20201202 header.b=ek7vXs+5; 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 S229949AbhBZOHz (ORCPT + 99 others); Fri, 26 Feb 2021 09:07:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:59936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbhBZOFG (ORCPT ); Fri, 26 Feb 2021 09:05:06 -0500 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 Cc: Arnd Bergmann , Ard Biesheuvel , Mark Rutland , Marc Zyngier , David Brazdil , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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 -- 2.29.2