+2009-04-01 DJ Delorie <dj@redhat.com>
+
+ * varasm.c (default_function_rodata_section): Don't assume
+ anything about where the first '.' in the section name is.
+
2009-04-01 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.c (rs6000_emit_stack_reset): Delete redundant
if (DECL_ONE_ONLY (decl) && HAVE_COMDAT_GROUP)
{
- size_t len = strlen (name) + 3;
- char* rname = (char *) alloca (len);
+ char *dot;
+ size_t len;
+ char* rname;
+
+ dot = strchr (name + 1, '.');
+ if (!dot)
+ dot = name;
+ len = strlen (dot) + 8;
+ rname = (char *) alloca (len);
strcpy (rname, ".rodata");
- strcat (rname, name + 5);
+ strcat (rname, dot);
return get_section (rname, SECTION_LINKONCE, decl);
}
/* For .gnu.linkonce.t.foo we want to use .gnu.linkonce.r.foo. */