From: DJ Delorie Date: Tue, 22 Jan 2002 01:09:49 +0000 (+0000) Subject: * config/obj-coff.c (obj_coff_init_stab_section): Make the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23deb9235a747924e47c1f9c9d0aa6e20b2e8c16;p=binutils-gdb.git * config/obj-coff.c (obj_coff_init_stab_section): Make the stabstr_name allocation permanent, as it will be referenced from the section hash. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index fec9d50cfcf..87a7ad299d9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2002-01-21 DJ Delorie + + * config/obj-coff.c (obj_coff_init_stab_section): Make the + stabstr_name allocation permanent, as it will be referenced from + the section hash. + 2002-01-21 Jason Thorpe * configure.in (ia64-*-netbsd*): New target. diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index 4421e4ff080..759389acdf6 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -1631,7 +1631,7 @@ obj_coff_init_stab_section (seg) /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); - stabstr_name = (char *) alloca (strlen (seg->name) + 4); + stabstr_name = (char *) xmalloc (strlen (seg->name) + 4); strcpy (stabstr_name, seg->name); strcat (stabstr_name, "str"); stroff = get_stab_string_offset (file, stabstr_name);