ld error message %C format

Ian Lance Taylor iant@google.com
Wed May 18 23:59:00 GMT 2011


Alan Modra <amodra@gmail.com> writes:

> How do people feel about extending typical linker error messages like
> the following
> 	tmpdir/dump0.o: In function `foo':
> 	./compressed1.c:13: undefined reference to `bar'
> to always include the section and offset information?
> 	tmpdir/dump0.o: In function `foo':
> 	./compressed1.c:13:(.text+0x8): undefined reference to `bar'
>
> When debugging toolchain problems, the section and offset is often
> more useful than the source information.  I've checked that this
> change doesn't seem to break emacs parsing of error messages.

While I'm generally not happy about adding options, I think this is a
case where we should consider it.  That is, consider an option
requesting more verbose information from linker errors.  I think that
for ordinary users of the linker, i.e., 99.9% of linker users, the
section+offset will be far more confusing than helpful.

Ian



More information about the Binutils mailing list