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]

Fix Xtensa linkonce section naming


My change on 2003-10-14 was not quite right. Linkonce sections for Xtensa "property tables" were being named in an ambiguous way -- such that the property tables for different linkonce sections were ending up in the same section. I'm not sure that this problem breaks anything and I haven't seen any specific failures from it, but it's not how it's supposed to be. Committed on the mainline.

2004-05-17 Bob Wilson <bob.wilson@acm.org>

        * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
        section names by inserting a new substring after .gnu.linkonce, except
        for .gnu.linkonce.t.* where the "t." is replaced.


Index: elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.26
diff -u -p -r1.26 elf32-xtensa.c
--- elf32-xtensa.c	27 Apr 2004 21:28:16 -0000	1.26
+++ elf32-xtensa.c	17 May 2004 20:23:59 -0000
@@ -5685,12 +5685,10 @@ xtensa_get_property_section_name (sec, b
       prop_sec_name[linkonce_len + 1] = '.';
 
       suffix = sec->name + linkonce_len;
-      while (*suffix)
-	{
-	  suffix += 1;
-	  if (suffix[-1] == '.')
-	    break;
-	}
+      /* For backward compatibility, replace "t." instead of inserting
+	 the new linkonce_kind.  */
+      if (strncmp (suffix, "t.", 2) == 0)
+	suffix += 2;
       strcpy (prop_sec_name + linkonce_len + 2, suffix);
 
       return prop_sec_name;

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