https://sourceware.org/bugzilla/show_bug.cgi?id=16787
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Nick Clifton from comment #10) > Sorry, but I still canont reproduce this failure. :-( > > H.J. - your test case does not demonstrated the problem, at least as far as > I can see. It shows the linker not referencing any source file when > complaining about the undefined reference: > > t13.o: In function `t3': > (.text+0x1a): undefined reference to `udf' > > Ma's bug report, if I understand it correctly, is about the linker > referencing the wrong source file (t4.c) in its output. Incidentally when I It is the same issue with a different symptom. > run your test case on my system (x86_64 Fedora 20) I get the correct output: > > gcc -B./ -o x t13.o tt.o t2.o > t13.o: In function `t1': > /home/nickc/work/builds/gcc/current/x86_64-pc-linux-gnu/tests/t1.c:2: > warning: foobar > t13.o: In function `t3': > /home/nickc/work/builds/gcc/current/x86_64-pc-linux-gnu/tests/t3.c:2: > undefined reference to `udf' Your ld is gold. Try -fuse-ld=bfd. Gold works on this one, but fails the original test. > > Ma - your proposed patch might work - I have no way to test it at the moment > - but it does also have one flaw. It calls _bfd_dwarf2_cleanup_debug_info > without first checking to see if the input object file is an ELF format file. > > Ideally when we do have a fix for this problem we should add a test case to > the linker testsuite as well. Do you think that you could write one ? That > way, assuming that the test works for non-ARM based ELF targets I might be > able to reproduce the problem myself. That is what my testase is for. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils