From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.216]) by sourceware.org (Postfix) with ESMTPS id 4C7FD3857BB5 for ; Tue, 12 Dec 2023 08:15:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C7FD3857BB5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4C7FD3857BB5 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=81.169.146.216 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1702368937; cv=pass; b=fpR6zN5pHF6t+1BRRaTNGLL7pVoPDwHG/eT0W4OuKAg9CKmkn4yPFgx5RlwHw2q/nIRjcRjzgA962CbRsW2Pdbk3H6kuwHeW7+pHLbSf/z9W0Dktp7lhjuJVlINk/TubmfSNKujceX3Z590V8fq0TjVbBg7MqaVLXwDyA+l1iyk= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1702368937; c=relaxed/simple; bh=xSDT01VtnFVrQFkafpRo15bFBBlH8ZkQVB+u5ZgRp+M=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:From:To; b=wqPLQK/33tVNfZXRE6GuR7jOD4oQZYbBe5aOvq4a3+E2ZBf9/No3lJ/3lEXHClXqgegS4yTHLyM7SF3usSMedyI/J+mDB4gUCGVqY0b3MtH2qLCHFBt92jsHbIA0dg6v2V4397dyU3lh610SB/evJV9IchJK/ERwDCheLMdsHsM= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1702368934; cv=none; d=strato.com; s=strato-dkim-0002; b=pZ0HT1ELV6SmAs4HHg5nTq+Ywz1aRGV2kFgblEkspiX97tXnaoFCw9TnjRexX2Alsi LU439UDvYAxWffwkFoJLMsdAvMFGxBj6H9Tfaz/sQHpPLtVNGrAxIlG0lSeh3Mi0ng++ HNQrIrKus+6V1hiBsvBoH2FGIkZc4zF7pkxfspNQ19ljwnA6JjTPqhSBKKSefJ+kxrMe KcnEC2PdvMJlQJCPYpKtUSoj8b3wqkRCpEKlvQ7ggCB0cLR5Ry+Su8J7oB//pMz123FX 0MWPWVPgt/eDvp5q8kyFiPnkAHkiaOSDU6Hxlj1Mhkorq6E3Fbwz124EddwnpeX92lBL nmwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1702368934; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:To:From:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=b334lcezQDeXgxdgvPu6ZwSfdJbIYbLwroCPfebG14c=; b=MpVti1f/7iDWPGWu+dX0y1BqaN/em54hsjVil5wfkXCgSLZilldGgD97X6QOGFTer4 APT8bRz4gXPSZ7hpjJbfkXN3Qt9wPGLitk0HkGcKw7ozVlsdxvhgZMC0pRcwRZvRwbr3 w8CRPsrYirofEpoaBzj3kKdROusX45vQAkpXuIL7HV3LIdJnOC81EWEGOD3Y79xDK/Aa jMewf+9xnFxDA7U6QFp5CZb4/MvVmUxs+fPpRobm94Pq/LEsYWrPst5SUJOBLfmiYX82 st0kw2xS2iJuXXoHM0hIbLao6Kvmo4daIn21wtkYfzlJ57w+TyEBQkQ/Kjl88May3muL vqkw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1702368934; s=strato-dkim-0002; d=gjlay.de; h=In-Reply-To:References:To:From:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=b334lcezQDeXgxdgvPu6ZwSfdJbIYbLwroCPfebG14c=; b=VL51D8DJNmNCH6tpnhHI0OPFlBTE3aIbKShFndAJkKl98T3FFtdU/pBuZuOiiD8/WS yJ+2kh6AJJSI2rrdOISqXup+VPxOnSx+GND1OifUOMiJc9KbXwfMvMYeICyZlXliCWPK KEyAlvDsenz/eT3Q2GynJkWBKkrI04CmD323enTsPxv3fkyVN4w/rmfSU2cbc8QkNeYQ mAv8qvMQIVpP1r4+IV1kmmEK257qGh27KOXAF8rJZhseoovTtmtnw0KcW7WxE6uTLiak NIjwe6nIAwJk6CGlrHvmP83H/kOAY77rPX2azpcbzzZFacKmNpdpCEtcKBvhFp2mZbXK Jyag== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1702368934; s=strato-dkim-0003; d=gjlay.de; h=In-Reply-To:References:To:From:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=b334lcezQDeXgxdgvPu6ZwSfdJbIYbLwroCPfebG14c=; b=KdGlVgp9msgwmZQkrhvOhzyw7xlEZJ984+X/ItBOclZ24U9lNxGPkwjUNJGKI+nDjT we/EyjhPxjX082H7hjAg== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkSjsSjo3O/MHXSz1aalw==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 49.10.0 DYNA|AUTH) with ESMTPSA id Lf3d8bzBC8FYfan (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 12 Dec 2023 09:15:34 +0100 (CET) Message-ID: <216209a1-fd04-47ad-b9ee-fcc15e291a2b@gjlay.de> Date: Tue, 12 Dec 2023 09:15:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch, avr] PR31124: Support rodata in flash for more AVR devices Content-Language: en-US From: Georg-Johann Lay To: Nick Clifton , binutils@sourceware.org References: <959585a4-d3b7-499a-ad6a-3a3ae7f805cc@gjlay.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE,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: Am 11.12.23 um 19:33 schrieb Georg-Johann Lay: > Am 11.12.23 um 16:41 schrieb Nick Clifton: >> Hi Johann, >> >>> This patch adds two new emulations in order to support rodata in >>> flash for more devices. >> >> Patch approved - please apply.  (Or let me know and I will apply it >> for you). > > Hi Nick, > > I do not have write access to Binutils, at least I never asked for it. > >>> What I am unsure about >> >> Err - didn't you write this patch ? > > I did.  But even after studying the documentation many things are > not 100 clear. > >>> is the ABSOLUTE in avrxmega2_flmap.x: >>> >>>    .rodata  __rodata_start   :  AT (__rodata_load_start) >>>    { >>>      ... >>>       __rodata_end = ABSOLUTE(.) ; >>>    }  > rodata >>> >>> No other places in the ld scripts use ABSOLUTE, e.g. for __data_end in: >>> >>>    .data : >>>    { >>>       ... >>>       PROVIDE (__data_end = .) ; >>>    }  > data AT> text >> >> The difference is, presumably, that the symbols are going to be used >> in different ways.  The __data_end symbol, for example is more like a >> size-of-the-data-section symbol whereas the __rodata_end symbol is more >> of a no-more-read-only-data-after-this-address kind of symbol. >> >> Cheers >>    Nick > > The startup code copies __data_load_start...__data_load_end-1 to > __data_start...__data_end-1, so the date size is the difference. > > There is currently no use for the rodata symbols; I added them in > case a user wants to compute CRC etc. > > The hardware has the assertion that __rodata_load_start - __rodata_start > must be 0 mod 0x8000.  And it should always be the case that > __rodata_load_end - __rodata_load_start = __rodata_end - __rodata_start. > I am just unsure if that's always the case, e.g. when the user starts > moving stuff around with objcopy or whatnot. When the user uses objcopy or something to patch the result from the final link, then the ld script cannot diagnose that with ASSERT. So presumably I am overthinking all this... Johann > I tested with -Ttext; and when .text reaches into .rodata, then both > LMA and VMA are shifted in sync like it's supposed to be. > > > Johann