From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 4210A3857835 for ; Thu, 25 May 2023 16:01:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4210A3857835 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 615F121C6B; Thu, 25 May 2023 16:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1685030507; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dlyo9M0791UsS+HtRms0gjFb6X2+FA1ByUPyYm3g884=; b=vfmB5V0Uyz2rJxLCBRvKeC74yM2NUuVc/x5KfvAbAqP+rbWsOx8C7aA7MbAFNBhU72Ks5a BcJrAW5xFTJA6BEasfIZDFtOYwGgQHIGMq24XeEQhqZcDdo2j9lnZAXEM7Cs2i1r7BOgo5 gaiisk3RlYshPyRTGhpTRi2dtEgOXSI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1685030507; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dlyo9M0791UsS+HtRms0gjFb6X2+FA1ByUPyYm3g884=; b=dTvjkXZXn1fsx9SP0TjmI2dzSCC9HttvP0wjYnTmVrtAhkwQY40T1xywRBHM9c6mAWK/+y eswALQb9md5E+eBA== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 54FAF2C141; Thu, 25 May 2023 16:01:47 +0000 (UTC) Received: by wotan.suse.de (Postfix, from userid 10510) id 4A580669A; Thu, 25 May 2023 16:01:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by wotan.suse.de (Postfix) with ESMTP id 492DF661C; Thu, 25 May 2023 16:01:47 +0000 (UTC) Date: Thu, 25 May 2023 16:01:47 +0000 (UTC) From: Michael Matz To: "Richard Earnshaw (lists)" cc: binutils@sourceware.org Subject: Re: [PATCH] PR30437 aarch64: make RELA relocs idempotent In-Reply-To: <57db6134-6543-0763-62de-bb70208e766f@arm.com> Message-ID: References: <1ba7b2c7-b489-79af-3f2a-56450c86d955@arm.com> <1ed54fc8-8ba0-9106-377e-61400af6c00c@arm.com> <2856489e-2127-8ab9-4902-6b8c6ea343bd@arm.com> <57db6134-6543-0763-62de-bb70208e766f@arm.com> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, On Thu, 25 May 2023, Richard Earnshaw (lists) wrote: > > (And of course, it's always possible that REL relocations cannot always be > > used to achieve idempotence even in presence of 'ld -r', in which case > > RELA must be used. The aarch64 psABI thankfully even spells this out.) > > There's no fundamental reason why a toolchain doing 'ld -r' can't always emit > RELA format relocs, even if the input format was REL. In fact, I'd argue that > really it has to in most cases as 'ld -r' destroys the information that's > needed to reprocess the relocations. Right. > But I agree with you, this is all likely broken in BFD because we have > no way of testing it (gas can't create multiple relocs to a single > location to the best of my knowledge). With the .reloc directive it should be possible. But if you try to do that you probably go down a rabbit hole of strange and wonderful proportions :) Ciao, Michael.