Format of ld error message

Nick Clifton nickc@redhat.com
Wed Mar 21 09:34:00 GMT 2007


Hi Nick,

> nickrob/21 ld -v
> GNU ld version 2.16.91.0.6 20060212

OK, that is an old version, and some error message formatting problems 
have definitely been fixed since that version was released.


> If current ld gives different output, could you please post it so that I can
> check that Emacs can indeed parse it.

Current versions of the linker now produce this message:

   myprint.o: In function `myprint':
   /.../myprint.c:3: undefined reference to `mysquare6'

The "/.../" in the above message is the absolute path to the myprint.c 
source file.  I have compressed it here because in my case that was a 
very long path.

> PS cc -v -g myprog.c myprint.o gives:
> myprint.o: In function `myprint':/home/nickrob/myprint.c:3: undefined reference to `mysquare6'

The only difference between the current output and the version you are 
seeing appears to be a newline after the first colon.  This does make 
the second line of the output conform to most of the error message 
specification:

   PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE

The only thing that is missing is the program name.  Is this an 
essential component for emacs ?

Cheers
   Nick



More information about the Binutils mailing list