bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nonstandard error message from ld


From: Nick Clifton
Subject: Re: Nonstandard error message from ld
Date: Wed, 22 Dec 2004 12:39:38 +0000
User-agent: Mozilla Thunderbird 1.0RC1 (X11/20041201)

Hi Richard,

I think this is a matter of incorrect output from ld, because the
second error message doesn't follow the specs in the GNU Coding
Standards.  Outputting that extra information (in parens) may
be useful, but please don't put it into the beginning of the error
message which is the part that's supposed to be parsable by programs.

From: Per Cederqvist <address@hidden>

sip/sip.a(Receiver.o)(.text+0x1ec0): In function `Receiver::ProcessMsg(int)':
/opt/users/ceder/sipfw/sip/src/Receiver.cpp:776: undefined reference to 
`scAccept(int, int)'
sip/sip.a(Receiver.o)(.text+0x1fc8):/opt/users/ceder/sipfw/sip/src/Receiver.cpp:798:
 undefined reference to `scAccept(int, int)'

I have created a binutils bug report (ld/614) to cover this issue.

I currently have a patch that may solve the problem - I am running regressions tests to see if it breaks anything. Perhaps you would like to look at it as well ?

Using the testcase I created the linker produces these error messages before the patch:

  ./libundef.a(undef.o)(.text+0x7): In function `bar':
  undef.c: undefined reference to `foo'
  ./libundef.a(undef.o)(.text+0x19):undef.c: undefined reference to `foo'
  collect2: ld returned 1 exit status

And these error messages afterwards:

  ./libundef.a(undef.o): In function `bar':
  undef.c:(.text+0x7): undefined reference to `foo'
  undef.c:(.text+0x19): undefined reference to `foo'
  collect2: ld returned 1 exit status

Is this what you were expecting ? The linker does not have the line numbers available for the bar() function so it uses section-name+offset instead, but it follows the format in the GNU Coding Standard when it does this.

Cheers
  Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]