The test that gold printed for an error message location was overly verbose. This patch changes it. Now if there is file/lineno available, we just print that. Otherwise we print the object name, and either filename/function or section+offset. In all cases we omit the program name. Without debug info: Old gold: gold/ld-new: foo2.o: in function main:foo2.cc(.text+0x5): error: undefined reference to 'bar()' gold/ld-new: foo2.o:(.eh_frame+0x12): error: undefined reference to '__gxx_personality_v0' New gold: foo2.o:foo2.cc:function main: error: undefined reference to 'bar()' foo2.o(.eh_frame+0x12): error: undefined reference to '__gxx_personality_v0' GNU ld: foo2.o: In function `main': foo2.cc:(.text+0x5): undefined reference to `bar()' foo2.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' With debug info: Old gold: gold/ld-new: foo2.o: in function main:/home/iant/foo2.cc:3: error: undefined reference to 'bar()' gold/ld-new: foo2.o:(.eh_frame+0x12): error: undefined reference to '__gxx_personality_v0' New gold: /home/iant/foo2.cc:3: error: undefined reference to 'bar()' foo2.o(.eh_frame+0x12): error: undefined reference to '__gxx_personality_v0' GNU ld: foo2.o: In function `main': /home/iant/foo2.cc:3: undefined reference to `bar()' foo2.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' Committed to mainline. Ian 2011-04-17 Ian Lance Taylor * object.cc (Relocate_info::location): Simplify location string. * errors.cc (Errors::error_at_location): Don't print program name. (Errors::warning_at_location): Likewise. (Errors::undefined_symbol): Likewise. * testsuite/debug_msg.sh: Update accordingly.