D27676: [ELF] - Use full object name if source file name exist when reporting errors.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 00:48:04 PST 2016


>Isn't it too verbose? Source file names are the thing you need to fix your problems, so it might be better to not print out object files to keep developers from distracting.
>
>
>https://reviews.llvm.org/D27676

My use case was: I tried to fix the port linked by LLD and saw

Error is:
/usr/bin/ld: error: byte_copy.c:(.text+0x0): duplicate symbol 'byte_copy'
/usr/bin/ld: error: byte_copy.c:(function byte_copy): previous definition was her

I am not a developer of this port, so names "byte_copy.c", symbol 'byte_copy' says nothing for me.
It is very often situation in the wild, not everyone are developers of code, there are still lot people who have to
maintain third party code or port unknown code to different plaftorms.

In this situation I had to debug the LLD to see what this symbol is. Where it comes first, I had to know
our rules of handling .a files to ask the question if we really want to fix that, beause I understand that it is more a 'feature'
than a bug. Because error says that "byte_copy.c" has a problems, but it is not.

Now imagine some person tries to use LLD first time and see such error above. 
It is totally confusing for him, I am sure. "distracting" is to make users debug this things to find the real issue I think.

Best regards,
George.




More information about the llvm-commits mailing list