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: [PATCH] PR ld/16746: Don't issue a warning for reference in LTO IR


On Tue, Mar 25, 2014 at 01:39:52PM -0700, H.J. Lu wrote:
>  	case WARNC:
> -	  /* Issue a warning and cycle.  */
> -	  if (h->u.i.warning != NULL)
> +	  /* Issue a warning and cycle.  Don't issue a warning for
> +	     reference in LTO IR which may be removed by LTO later. */
> +	  if (h->u.i.warning != NULL
> +	      && (abfd->flags & BFD_PLUGIN) == 0)

So here you're handling references in LTO IR for warning symbols
defined in real object files or other LTO IR files..

>  	case WARN:
> +	  /* Don't issue a warning for reference in LTO IR which may be
> +	     removed by LTO later.  Make a warning symbol instead.  */
> +	  if ((hash_entry_bfd (h)->flags & BFD_PLUGIN) != 0)
> +	    goto mwarn;
> +

And here you have the case where the new symbol is a warning symbol,
in either LTO IR or real object files, but the reference was in an LTO
IR file.

What about the CWARN case, where you already have a definition that
may have been referenced, and the new symbol is a warning symbol?
You'll need to test h->non_ir_ref I think.

-- 
Alan Modra
Australia Development Lab, IBM


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