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]

ld - no diagnostic when the location counter moves backwards


Hi,

I have run into what seems like a bug in ld 2.16.1 and
2.17.  I have managed to strip down my program to a
minimal example demonstrating the issue (attached).  I
am using gcc 4.0.3 with both binutils 2.16.1 and 2.17,
Solaris 9 host, powerpc-eabi target.

The final assignment in foo.ld moves the location
counter backwards (see foo.map) but I get no error
from ld.  Making just about any change to foo.ld makes
the error message appear (or the backward movement go
away).  The ld manual, section 3.10.4 "The Location
Counter" states that the location counter may never be
moved backwards.

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.

Is this a bug?

Thanks!

Ron McCall

Attachment: ldbug.tar.gz
Description: 3708638176-ldbug.tar.gz


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