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 Tue, Nov 15, 2005 at 08:54:57AM +0100, Jan Beulich wrote:
> >Same here.  If S_IS_COMMON doesn't work, we need to fix it.  I'll be
> >happy to review a followup patch.
> 
> So for a quick solution I'd prefer changing S_IS_COMMON then in the way
> you outlined in the response to the '.comm symbol, 0' question - is that
> OK for you? I don't think I feel certain to fix the other object formats

No, I much prefer to fix this properly.

> to properly set the section on common symbols (my main fear is they may
> have hidden dependencies on that).
> 
> Also this means I'll hold back applying this patch to avoid introducing
> testsuite failures.

I think this is all we need.  Testing..

	* read.c (s_comm_internal): Set bfd_com_section segment.
	(s_mri_common): Likewise.

Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.112
diff -u -p -r1.112 read.c
--- gas/read.c	4 Nov 2005 19:45:24 -0000	1.112
+++ gas/read.c	15 Nov 2005 08:50:07 -0000
@@ -1490,6 +1490,7 @@ s_comm_internal (int param,
     {
       S_SET_VALUE (symbolP, (valueT) size);
       S_SET_EXTERNAL (symbolP);
+      S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
 #ifdef OBJ_VMS
       {
 	extern int flag_one;
@@ -1583,6 +1584,7 @@ s_mri_common (int small ATTRIBUTE_UNUSED
     }
 
   S_SET_EXTERNAL (sym);
+  S_SET_SEGMENT (sym, bfd_com_section_ptr);
   mri_common_symbol = sym;
 
 #ifdef S_SET_ALIGN


-- 
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]