This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Broken -frepo (was Re: PATCH: PR ld/1396: prohibited cross reference to a local symbol)


On Thu, Mar 30, 2006 at 03:51:34PM +0200, Jakub Jelinek wrote:
> On Tue, Oct 04, 2005 at 12:52:49PM -0700, H. J. Lu wrote:
> > The patch is incorrect. Here is the right one.
> 
> > 2005-10-04  H.J. Lu  <hongjiu.lu@intel.com>
> > 
> > 	PR ld/1396
> > 	* ldcref.c (check_refs): Accept asymbol *.
> > 	(check_local_sym_xref): Pass sym to check_refs.
> > 	(check_nocrossref): Pass NULL to check_refs.
> > 	(check_refs_info): Add asymbol *.
> > 	(check_refs): Add asymbol * to check_refs_info.
> > 	(check_reloc_refs): Match relocations with proper symbols.
> > 
> > 	* ldmisc.c (vfinfo): Don't add extra ":\n".
> 
> This patch broke g++ -frepo.
> While previously we got output like:
> a.o: In function `main':
> a.C:(.text+0xd): undefined reference to `C<int>::C()'
> with 2005-10-05+ binutils we now get it all on one line:
> a.o: In function `main':a.C:(.text+0xd): undefined reference to `C<int>::C()'
> 
> Is that ld change desirable?  If not, we need to fix it, otherwise
> we should update collect2's ld output parser to handle even this.
> 

When .o file isn't compiled with -g, the old linker outputs:

lib.o: In function `bar':
: prohibited cross reference from .text to `foo' in .foo

I changed it to one line:

lib.o: In function `bar': prohibited cross reference from .text to `foo' in .foo

I have no strong opinion one way or the other.



H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]