(bfd_get_unique_section_name): Put a dot before the numeric suffix.

This commit is contained in:
Alan Modra 2000-09-08 02:11:34 +00:00
parent 6221ac1b93
commit 77cb06e9d4
2 changed files with 156 additions and 151 deletions

View file

@ -1,3 +1,8 @@
2000-09-08 Alan Modra <alan@linuxcare.com.au>
* section.c (bfd_get_unique_section_name): Put a dot before the
numeric suffix.
2000-09-07 Kazu Hirata <kazu@hxi.com>
* doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.

View file

@ -654,10 +654,10 @@ SYNOPSIS
DESCRIPTION
Invent a section name that is unique in @var{abfd} by tacking
a digit suffix onto the original @var{templat}. If @var{count}
is non-NULL, then it specifies the first number tried as a
suffix to generate a unique name. The value pointed to by
@var{count} will be incremented in this case.
a dot and a digit suffix onto the original @var{templat}. If
@var{count} is non-NULL, then it specifies the first number
tried as a suffix to generate a unique name. The value
pointed to by @var{count} will be incremented in this case.
*/
char *
@ -671,7 +671,7 @@ bfd_get_unique_section_name (abfd, templat, count)
char *sname;
len = strlen (templat);
sname = bfd_malloc (len + 7);
sname = bfd_malloc (len + 8);
strcpy (sname, templat);
num = 1;
if (count != NULL)
@ -682,7 +682,7 @@ bfd_get_unique_section_name (abfd, templat, count)
/* If we have a million sections, something is badly wrong. */
if (num > 999999)
abort ();
sprintf (sname + len, "%d", num++);
sprintf (sname + len, ".%d", num++);
}
while (bfd_get_section_by_name (abfd, sname) != NULL);