This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is it only avr-ld which doesn't detect memory region overflow?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]