mirror of git://gcc.gnu.org/git/gcc.git
varasm.c (default_function_rodata_section): Don't assume anything about where the first '.' in the section name is.
* varasm.c (default_function_rodata_section): Don't assume anything about where the first '.' in the section name is. From-SVN: r145388
This commit is contained in:
parent
b246d10043
commit
e893f6f38e
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
|||
13
gcc/varasm.c
13
gcc/varasm.c
|
|
@ -869,11 +869,18 @@ default_function_rodata_section (tree decl)
|
|||
|
||||
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. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue