bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/16787] LD gives wrong error messages


From: ma.jiang at zte dot com.cn
Subject: [Bug ld/16787] LD gives wrong error messages
Date: Mon, 14 Apr 2014 01:30:29 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16787

--- Comment #12 from ma.jiang at zte dot com.cn ---
(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
> 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'
> 
> 
> 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.
> 
> Cheers
>   Nick

Hi Nick,
  the testcase uploaded by H.J.Lu is a simpler version of mine.I use some
macros to extend text seciont vma of t4.c, so that the wrong error shows the
undefined referencing is in t4.c(In order to show how misleading the bug can
be). H.J.Lu does not fake these macros, so the linker just can not find any
file for the undefined referencing. Anyway ,the two tesecases are same in
essence.
  I do not know why you can not reproduce the bug in your server.I have not use
gold linker before.I think you could try H.J.Lu's advice.
  As to the fix, I think we could discuss it in detail after you reproduce the
bug :-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

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