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] Re: Your gas changes caused weakref failures for cris-elf, supposedly others too


On Mon, Nov 14, 2005 at 09:06:42AM +0100, Jan Beulich wrote:
> gas/
> 2005-11-14  Jan Beulich  <jbeulich@novell.com>
> 
> 	* symbols.h (S_CLEAR_VOLATILE): Declare.
> 	* symbols.c (colon): Also accept redefinable symbols for
> 	redefinition. Clone them before modifying.
> 	(S_CLEAR_VOLATILE): Define.
> 	* cond.c (s_ifdef): Also test for equated and common symbols.
> 	* read.c (s_comm_internal): Also exclude non-redefinable
> 	equated symbols. Clone redefinable ones before modifying.
> 	(assign_symbol): Also exclude common symbols from
> 	redefinition.
> 	(s_weakref): Likewise. Clone redefinable symbols before
> 	modifying.
> 	* doc/internals.texi: Document sy_volatile, sy_forward_ref,
> 	S_IS_VOLATILE, S_SET_VOLATILE, S_CLEAR_VOLATILE,
> 	S_IS_FORWARD_REF, and S_SET_FORWARD_REF.
> 
> gas/testsuite/
> 2005-11-14  Jan Beulich  <jbeulich@novell.com>
> 
> 	* gas/all/cond.s: Also check ifdef works on equates and
> 	commons.
> 	* gas/all/cond.l: Adjust.
> 	* gas/all/redef2.s: Also test redefining equate to label.
> 	* gas/all/redef2.d: Adjust.
> 	* gas/all/redef3.[sd]: New.
> 	* gas/all/redef4.s: New.
> 	* gas/all/redef5.s: New.
> 	* gas/elf/redef.s: New, copied from original gas/all/redef2.s.
> 	* gas/elf/redef.d: Remove #source.
> 	* gas/all/gas.exp: Remove exclusion of iq2000-*-* from and
> 	adjust xfails for redefinition tests. Run new tests. Exclude
> 	alpha*-*-*, mips*-*-*, *c54x*-*-* from weakref tests.

OK, but

> -	&& S_IS_DEFINED (symbolP)
> +	&& (S_IS_DEFINED (symbolP)
> +	    || symbol_equated_p (symbolP)
> +	    || S_GET_VALUE (symbolP))

Please use S_IS_COMMON here rather than S_GET_VALUE, 

> @@ -2794,7 +2806,11 @@ assign_symbol (char *name, int mode)
>  #endif
>      }
>  
> -  if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
> +  if (S_IS_DEFINED (symbolP)
> +      || symbol_equated_p (symbolP)
> +      /* This detects common symbols not put in bfd_com_section, which
> +	 S_IS_COMMON doesn't recognize.  */
> +      || S_GET_VALUE (symbolP))

Same here.  If S_IS_COMMON doesn't work, we need to fix it.  I'll be
happy to review a followup patch.

> @@ -3178,12 +3194,22 @@ s_weakref (int ignore ATTRIBUTE_UNUSED)
>  
>    symbolP = symbol_find_or_make (name);
>  
> -  if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
> +  if (S_IS_DEFINED (symbolP)
> +      || symbol_equated_p (symbolP)
> +      || S_GET_VALUE (symbolP))

Again.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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