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]

PR gas/11841, redefine section symbol


If we are redefining a section symbol it's no longer a section
symbol.  Whether doing so is a good idea, is another question.

	PR gas/11841
	* symbols.c (symbol_clone): Clear BSF_SECTION_SYM flag.

Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.102
diff -u -p -r1.102 symbols.c
--- gas/symbols.c	11 Dec 2009 13:42:09 -0000	1.102
+++ gas/symbols.c	28 Jul 2010 07:26:28 -0000
@@ -572,8 +572,8 @@ symbol_clone (symbolS *orgsymP, int repl
     as_fatal ("bfd_make_empty_symbol: %s", bfd_errmsg (bfd_get_error ()));
   newsymP->bsym = bsymnew;
   bsymnew->name = bsymorg->name;
-  bsymnew->flags =  bsymorg->flags;
-  bsymnew->section =  bsymorg->section;
+  bsymnew->flags = bsymorg->flags & !BSF_SECTION_SYM;
+  bsymnew->section = bsymorg->section;
   bfd_copy_private_symbol_data (bfd_asymbol_bfd (bsymorg), bsymorg,
 				bfd_asymbol_bfd (bsymnew), bsymnew);
 

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