bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12768] Improve the error message for linking failure


From: pcarroll at codesourcery dot com
Subject: [Bug ld/12768] Improve the error message for linking failure
Date: Mon, 16 May 2011 14:14:43 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12768

Paul Carroll <pcarroll at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pcarroll at codesourcery
                   |                            |dot com

--- Comment #1 from Paul Carroll <pcarroll at codesourcery dot com> 2011-05-16 
14:14:38 UTC ---
I worked on one solution for this issue last month.  The method I used was to
just make a list of external symbols for each input object (just a linked list
that points to the symbol entries in the hash table).  Then, when the error is
detected and it is time to emit a message, I just went through the list of
input objects and scanned each list of external symbols, looking for the symbol
entry that matches the entry for the hidden symbol.  They are one and the same.
 Once I find a matching symbol, I know which object file contained the
reference to the hidden symbol and could just print the name of that DSO.  

As noted, there is a small amount of overhead during the processing of input
files, to create the lists, but the overhead is a 4-byte pointer to the list
and then 8 bytes for each external symbol.  As an alternative, since this
message doesn't occur too often, a linker option could be added and the
original error message modified so the user just has to do one extra link to
identify the name of the DSO.  

There are other methodsfor solving this problem, such as reopening all input
objects and checking them for an external symbol matching the hidden symbol. I
just choose a solution that did not require a lot of changes to the BFD
library.  

My patch hasn't been reviewed yet, so it is not yet merged into the latest
Binutils trunk.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]