This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Is it only avr-ld which doesn't detect memory region overflow?
- From: Paul Koning <paul_koning at dell dot com>
- To: Erik Christiansen <dvalin at internode dot on dot net>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 14 Feb 2011 08:31:17 -0500
- Subject: Re: Is it only avr-ld which doesn't detect memory region overflow?
- References: <20110214130703.GA5317@ratatosk>
pdp11 doesn't either. I'm guessing that less than 32 bits of space isn't handled 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.
> :-)
>
> "Bug 12484 - avr-ld doesn't warn when a memory section is over "
> (http://sourceware.org/bugzilla/show_bug.cgi?id=12484)
>
> When creating a ROM image, for an embedded application, even the default
> linker script has:
>
> .data : AT (ADDR (.text) + SIZEOF (.text))
>
> and (typically):
>
> MEMORY
> {
> text (rx) : ORIGIN = 0, LENGTH = 32K
> data (rw!x) : ORIGIN = 0x800060, LENGTH = 0xffa0
> ...
>
> so that the LMA concatenation of .text and .data can easily overflow the
> text memory region, without overflowing either of the output sections.
>
> 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:
>>>>
> Message-ID: <44D894D9.2090007@redhat.com>
>
>> 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.
>
> I think that you can be sure of this.
>
> Cheers
> Nick
> <<<
>
> So I'm suspicious that this might be specific to the avr toolchain.
>
> Any observations would be gratefully received.
>
> Erik