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]

section_symbol tweak


Hardly earth shattering as bfd sets the section and symbol name the
same, but this caters for the case where the section symbol might
have a different name for some reason.

	* subsegs.c (section_symbol): Use the symbol, not the section, name.

Index: gas/subsegs.c
===================================================================
RCS file: /cvs/src/src/gas/subsegs.c,v
retrieving revision 1.12
diff -u -p -r1.12 subsegs.c
--- gas/subsegs.c	5 Sep 2002 00:01:15 -0000	1.12
+++ gas/subsegs.c	8 Dec 2002 02:58:24 -0000
@@ -529,13 +529,13 @@ section_symbol (sec)
   if (! EMIT_SECTION_SYMBOLS || symbol_table_frozen)
     {
       /* Here we know it won't be going into the symbol table.  */
-      s = symbol_create (sec->name, sec, 0, &zero_address_frag);
+      s = symbol_create (sec->symbol->name, sec, 0, &zero_address_frag);
     }
   else
     {
-      s = symbol_find_base (sec->name, 0);
+      s = symbol_find_base (sec->symbol->name, 0);
       if (s == NULL)
-	s = symbol_new (sec->name, sec, 0, &zero_address_frag);
+	s = symbol_new (sec->symbol->name, sec, 0, &zero_address_frag);
       else
 	{
 	  if (S_GET_SEGMENT (s) == undefined_section)

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