public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Is it only avr-ld which doesn't detect memory region overflow?
@ 2011-02-14 13:07 Erik Christiansen
  2011-02-14 13:31 ` Paul Koning
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Christiansen @ 2011-02-14 13:07 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Is it only avr-ld which doesn't detect memory region overflow?
  2011-02-14 13:07 Is it only avr-ld which doesn't detect memory region overflow? Erik Christiansen
@ 2011-02-14 13:31 ` Paul Koning
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Koning @ 2011-02-14 13:31 UTC (permalink / raw)
  To: Erik Christiansen; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-14 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 13:07 Is it only avr-ld which doesn't detect memory region overflow? Erik Christiansen
2011-02-14 13:31 ` Paul Koning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).