From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 47084C43334 for ; Thu, 30 Jun 2022 15:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p9ou9bA7jfWzC4FfPYtsESAwOw4080GTvhhBgHOjLdg=; b=0iqBFrvSi8y03i 4CLd5T2/7vXY2w2o4HXFghMv3JQGr8BGF0qqSQMAd1cz0W1jFJ+NlqUcaudVxPJA882UJzw8hJcmz DJycISpqlUn6etuJGQbnymPlWveNl6yr/RWwhBk3ASQ2eWXKyaz4XMFBhbpKnQrSkAvJO5dtUSPvN KgqcHXPMkxnmTFjwOu3yxS4Vr7yk+e0JObbFxXm1tmiDR9crxjECmetQXGWpeInn1NQM9oQ/zViaJ uao/5QdpneqOkG1Op3ukLMmvWjcNh3kT/NiPVEbSCuLj98FEx55/ffGaWwrla/USLqMDZUeiDS3p/ ST4ocApI11IQa5DdJXkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6wG3-000LZR-Fc; Thu, 30 Jun 2022 15:39:08 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6wCs-000Jgc-9k for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2022 15:35:52 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C6B7D61B32; Thu, 30 Jun 2022 15:35:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5D92C34115; Thu, 30 Jun 2022 15:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656603349; bh=xeXcHBHJp18s20H0r59IvRA/+hEOgADzH+b65yvr46c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UjTOs5sbsSdtav/pxqHza2CWHFFSzUSvDOE9ETGhBq7kgCdhjtYj50WSIvi6VCK18 xRlG38FDsPK1oeEplAFaqdsxFFo68VlYe2Y/IocLBP0Zy7ztOh3Gu0J/3c2Iuv1/cN nM1Q/VULCJpbCgaK4+wJKfA7w6fY/xm8dKzwT6hofjn5AfHvbalYllpeXbwfnsj3JH jdbKzF4X+4rm3wauNwkAEH58Zu3UaOml99To6kB8GaxUjpGHxYV5JG4iWJWfjEiIaO pVcA+MilbrvWX7kxa8qwpuCgqmR0B/j0SpG8kJ4PUJlC2zn1ymG6jpqCmj750o50/B nbJdAhxmuLz7Q== Date: Thu, 30 Jun 2022 08:35:47 -0700 From: Nathan Chancellor To: Catalin Marinas , Will Deacon Cc: Joey Gouly , Vincenzo Frascino , Nick Desaulniers , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 1/2] arm64: vdso32: Shuffle .ARM.exidx section above ELF_DETAILS Message-ID: References: <20220630153121.1317045-1-nathan@kernel.org> <20220630153121.1317045-2-nathan@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220630153121.1317045-2-nathan@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220630_083550_458121_EE7DDDA7 X-CRM114-Status: GOOD ( 20.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 30, 2022 at 08:31:20AM -0700, Nathan Chancellor wrote: > When building the 32-bit vDSO after commit 5c4fb60816ea ("arm64: vdso32: > add ARM.exidx* sections"), ld.lld 11 fails to link: > > ld.lld: error: could not allocate headers > ld.lld: error: unable to place section .text at file offset [0x2A0, 0xBB1]; check your linker script for overflows > ld.lld: error: unable to place section .comment at file offset [0xBB2, 0xC8A]; check your linker script for overflows > ld.lld: error: unable to place section .symtab at file offset [0xC8C, 0xE0B]; check your linker script for overflows > ld.lld: error: unable to place section .strtab at file offset [0xE0C, 0xF1C]; check your linker script for overflows > ld.lld: error: unable to place section .shstrtab at file offset [0xF1D, 0xFAA]; check your linker script for overflows > ld.lld: error: section .ARM.exidx file range overlaps with .hash > >>> .ARM.exidx range is [0x90, 0xCF] > >>> .hash range is [0xB4, 0xE3] > > ld.lld: error: section .hash file range overlaps with .ARM.attributes > >>> .hash range is [0xB4, 0xE3] > >>> .ARM.attributes range is [0xD0, 0x10B] > > ld.lld: error: section .ARM.attributes file range overlaps with .dynsym > >>> .ARM.attributes range is [0xD0, 0x10B] > >>> .dynsym range is [0xE4, 0x133] > > ld.lld: error: section .ARM.exidx virtual address range overlaps with .hash > >>> .ARM.exidx range is [0x90, 0xCF] > >>> .hash range is [0xB4, 0xE3] > > ld.lld: error: section .ARM.exidx load address range overlaps with .hash > >>> .ARM.exidx range is [0x90, 0xCF] > >>> .hash range is [0xB4, 0xE3] > > This was fixed in ld.lld 12 with a change to match GNU ld's semantics of > placing non-SHF_ALLOC sections after SHF_ALLOC sections. > > To workaround this issue, move the .ARM.exidx section before the > .comment, .symtab, .strtab, and .shstrtab sections (ELF_DETAILS) so that > those sections remain contiguous with the .ARM.attributes section. > > Fixes: 5c4fb60816ea ("arm64: vdso32: add ARM.exidx* sections") This should have been included to point out the exact commit that fixed this in ld.lld, I can resend if necessary (since I also screwed up the patches@lists.linux.dev domain...) Link: https://github.com/llvm/llvm-project/commit/ec29538af2e0886a65f479d6a533956a1c478132 > Signed-off-by: Nathan Chancellor > --- > arch/arm64/kernel/vdso32/vdso.lds.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S > index 6e67a6524d58..c25bed8e6df1 100644 > --- a/arch/arm64/kernel/vdso32/vdso.lds.S > +++ b/arch/arm64/kernel/vdso32/vdso.lds.S > @@ -56,8 +56,8 @@ SECTIONS > > .rel.dyn : { *(.rel*) } > > - ELF_DETAILS > .ARM.exidx : { *(.ARM.exidx*) } > + ELF_DETAILS > .ARM.attributes 0 : { *(.ARM.attributes) } > > /DISCARD/ : { > -- > 2.37.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel