This is the mail archive of the binutils@sources.redhat.com 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]

patch, d10v gas merge sections


This patch prevents adjustments to symbols in merge sections.

OK to commit?

Tom

--
Tom Rix
GCC Engineer
trix@redhat.com


2002-04-15  Tom Rix  <trix@redhat.com>

	* config/tc-d10v.c (d10v_fix_adjustable): Prevent adjustments to 
	symbols in merge sections.

Index: gas/config/tc-d10v.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-d10v.c,v
retrieving revision 1.25
diff -d -u -p -r1.25 tc-d10v.c
--- gas/config/tc-d10v.c	3 Apr 2002 19:44:05 -0000	1.25
+++ gas/config/tc-d10v.c	15 Apr 2002 17:22:11 -0000
@@ -1924,10 +1924,11 @@ d10v_fix_adjustable (fixP)
   if (fixP->fx_addsy == NULL)
     return 1;
 
-  /* Prevent all adjustments to global symbols.  */
-  if (S_IS_EXTERN (fixP->fx_addsy))
-    return 0;
-  if (S_IS_WEAK (fixP->fx_addsy))
+  /* Prevent all adjustments to global and weak symbols or symbols in
+     merge sections.  */
+  if ((S_IS_EXTERN (fixP->fx_addsy)
+       || (S_IS_WEAK (fixP->fx_addsy))
+       || (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0))
     return 0;
 
   /* We need the symbol name for the VTABLE entries.  */

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