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 [85.215.255.22]) by sourceware.org (Postfix) with ESMTPS id EB9123858CDA for ; Mon, 11 Dec 2023 18:33:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EB9123858CDA 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 EB9123858CDA Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.22 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1702319613; cv=pass; b=cjkVIxaOR/L+RPKz7bewJyb6yyzl8cZIclGBl4ZQY39fTOoY0Jl6fkMMcqljghRAEW7+lNou8DZPSXBFyjBQkn8Q/VJzmim6W04WcQwTTJglSfAay6LDXykQqKNtpQfrD6nBQ6zJgvrNdvt3Yt/6HxWboi/tFPx3p9ZqTNlhcD4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1702319613; c=relaxed/simple; bh=FK4As77p2Nh4xTC1vOD4UpOMgtky6HVh7UpGPIyit2s=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=IwEpzd5DIXM+p9h9nPslltP72K7Ri4U3BLvfsajexjD1+sTYfHqzityqvBrWnm5pcqIUSylvRAJV5Dcmf6z/Npcjmh5fFYMEvVnMd/g3H7T2GViBOX/dvRBsmgojmppFi9CcBxHYg4Hk0/9Df1asjFFqnFQZnmRjxJbt8+Pj0Mg= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1702319607; cv=none; d=strato.com; s=strato-dkim-0002; b=sAI58Abv3Sw2Jkm56HKhcBemFLW2XHh+sEkH/iqKRpJzL8Y7bFJ2Y5eFmbSsTXvoDX kI5nGTUt5w5MNRixtYh05iZ6Mt3s1T+9C+4Cl3EO5Q2e9qkaJYQ/US7re9DWJUPlfDxA jMwpnE08MkLvkSy9xeCUnO44yz9oeoXda+GCOu5L3NMreCUUvfse9B0tjzoERuzCrk2s kJUxMVdrIrts7MlsGwbEKH/5uJPtQ/e9ku4xRXXrw4SRoEeTIcveony9YvIFKIMTPd7p OUBOdC6OEIfP0gFZtmmpfg9tZVvVmZkYk9cPYN795gP+pdM06+PIE1h1wLG8HSl5ye2t tDlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1702319607; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:From:References:To:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=PaVK5puJq3x1mjKZpiN4LhFYbWWEb1qIcwy9EnziWm4=; b=qKIlL0icUB+xVVclLOi7duR+gALFHPukSxGqsBeXGNaZMD0JsiW6ICbaJViwU+piWx Ol4KkQR/2xwEGHYm6CnUuhHAEuk4C+dENrJZizVcXqJNlP5VQoISpHDjGCxHMJ/vev63 EKCxhcWsg1IKLSNM92a4yT6pTBpo1CDt+JElSTvPTUqQCnXMkNpZ9jEpDbAJg2gMDnfu HbAcjdpZWt2g63HVWSuetN7nU4AuY1fS+dFpPAyPThlB55JbF8t/tY621v3giEmjuNSW MpqzDeFfal/F99Ob9O9+hhOuXPG3u+OMKsi8PoET87D+3M14XgA/LTyVLWHls6X1gxaA pOTw== 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=1702319607; s=strato-dkim-0002; d=gjlay.de; h=In-Reply-To:From:References:To:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=PaVK5puJq3x1mjKZpiN4LhFYbWWEb1qIcwy9EnziWm4=; b=B2fcOCxzrxuVwqs9hIMMEc6EVh63N/Gm5aU9JuqG/2B/5CiY5tXWLMp0tykOP8E1d8 RHcS54WG9NeeGbAOAPubC0VqrdFkKl+HL1h/ObY6XeX552xig0/dWRR9wu1lo0+Hqh95 +78DEjqQmc/zfxgVaDVOd+69uTb3FKBmErb/k02XPfuiAMpzA3BR7NWiw91fQjuaHz6I 9ANmndswSrALZ+Xf4vcZRVYcmzuhbahlgvssJxV1iNHDQx2rX6BBkmjTS1ZM7W3apX55 l1F6yigxdeBvESyqJxIeG0uptccVUF88txBM4h5f8BtKQIkNVfTcp7eG2zBDGbiFrJsM stRw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1702319607; s=strato-dkim-0003; d=gjlay.de; h=In-Reply-To:From:References:To:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=PaVK5puJq3x1mjKZpiN4LhFYbWWEb1qIcwy9EnziWm4=; b=s3TJzxgjHZzHXYfMwlS2ihSF0/2uT0K6x0+kPuAgZc4TN7TI2GJnZhgTRNzp9gS/yE xJvBQujz7epMIt9YPBDg== 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 Lf3d8bzBBIXQdnL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 11 Dec 2023 19:33:26 +0100 (CET) Message-ID: Date: Mon, 11 Dec 2023 19:33:26 +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 To: Nick Clifton , binutils@sourceware.org References: <959585a4-d3b7-499a-ad6a-3a3ae7f805cc@gjlay.de> From: Georg-Johann Lay In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,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 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. 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