This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Broken -frepo (was Re: PATCH: PR ld/1396: prohibited cross reference to a local symbol)
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Mar 2006 07:15:54 -0800
- Subject: Re: Broken -frepo (was Re: PATCH: PR ld/1396: prohibited cross reference to a local symbol)
- References: <2734.192.168.201.6.1128350711.squirrel@pc300> <20051004195249.GB13574@lucon.org> <20060330135134.GC30252@sunsite.mff.cuni.cz>
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.