From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15232 invoked by alias); 14 Feb 2011 13:31:28 -0000 Received: (qmail 15224 invoked by uid 22791); 14 Feb 2011 13:31:27 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_XF,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60pc101.us.dell.com (HELO ausc60pc101.us.dell.com) (143.166.85.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 13:31:21 +0000 X-Loopcount0: from 10.152.240.141 Subject: Re: Is it only avr-ld which doesn't detect memory region overflow? Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Paul Koning In-Reply-To: <20110214130703.GA5317@ratatosk> Date: Mon, 14 Feb 2011 13:31:00 -0000 Cc: Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110214130703.GA5317@ratatosk> To: Erik Christiansen X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00139.txt.bz2 pdp11 doesn't either. I'm guessing that less than 32 bits of space isn't h= andled all that accurately anymore? paul On Feb 14, 2011, at 8:07 AM, Erik Christiansen wrote: > Does anyone know offhand whether other targets do currently detect > memory region overflow? (Then we have different maintainers to cajole. > :-) >=20 > "Bug 12484 - avr-ld doesn't warn when a memory section is over " > (http://sourceware.org/bugzilla/show_bug.cgi?id=3D12484) >=20 > When creating a ROM image, for an embedded application, even the default > linker script has: >=20 > .data : AT (ADDR (.text) + SIZEOF (.text)) >=20 > and (typically): >=20 > MEMORY > { > text (rx) : ORIGIN =3D 0, LENGTH =3D 32K > data (rw!x) : ORIGIN =3D 0x800060, LENGTH =3D 0xffa0 > ... >=20 > so that the LMA concatenation of .text and .data can easily overflow the > text memory region, without overflowing either of the output sections. >=20 > Though the archive search engine at http://sourceware.org/ml/binutils/ > finds only one unrelated match on "overflow", my old lurker's archive > has this, from 2006: >>>>=20 > Message-ID: <44D894D9.2090007@redhat.com> >=20 >> We have a large program in which many different object >> file sections are placed into various fixed size >> memory regions and I want to be sure that the linker >> will tell me when I overflow one of these regions. >=20 > I think that you can be sure of this. >=20 > Cheers > Nick > <<< >=20 > So I'm suspicious that this might be specific to the avr toolchain. >=20 > Any observations would be gratefully received. >=20 > Erik