This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/1396: prohibited cross reference to a local symbol
On Tue, Oct 04, 2005 at 12:52:49PM -0700, H. J. Lu wrote:
> 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 is OK, except that
> struct check_refs_info {
> const char *sym_name;
> + asymbol *sym;
> asection *defsec;
> struct lang_nocrossrefs *ncrs;
> asymbol **asymbols;
I don't see anywhere you use SYM other than to test for NULL
vs. non-NULL. I think it would be better to change this to a boolean
called "global" or somesuch.
--
Alan Modra
IBM OzLabs - Linux Technology Centre