aboutsummaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-09-08 02:11:34 +0000
committerAlan Modra <amodra@gmail.com>2000-09-08 02:11:34 +0000
commit77cb06e9d441ebf683dfb50c6ad274ad79d0f12d (patch)
tree869ee422915ced62a8ad314e7beed868096d6019 /bfd/section.c
parent6221ac1b933ef9b55689dc95cd83f1d6991dfe95 (diff)
downloadgdb-77cb06e9d441ebf683dfb50c6ad274ad79d0f12d.zip
gdb-77cb06e9d441ebf683dfb50c6ad274ad79d0f12d.tar.gz
gdb-77cb06e9d441ebf683dfb50c6ad274ad79d0f12d.tar.bz2
(bfd_get_unique_section_name): Put a dot before the numeric suffix.
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/section.c b/bfd/section.c
index 6064924..e70cdaa 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -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);