* mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when

looking for an unused section name.
This commit is contained in:
Alan Modra 2002-11-11 23:19:03 +00:00
parent f39315758c
commit a95a455043
2 changed files with 83 additions and 79 deletions

View File

@ -1,3 +1,8 @@
2002-11-12 Klee Dienes <kdienes@apple.com>
* mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
looking for an unused section name.
2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
* coff-h8300.c: Fix formatting.

View File

@ -1146,7 +1146,7 @@ bfd_mach_o_scan_read_thread (abfd, command)
char *sname;
const char *flavourstr;
const char *prefix = "LC_THREAD";
unsigned int i = 0;
unsigned int j = 0;
switch (mdata->header.cputype)
{
@ -1168,11 +1168,10 @@ bfd_mach_o_scan_read_thread (abfd, command)
for (;;)
{
sprintf (sname, "%s.%s.%u", prefix, flavourstr, i);
if (bfd_get_section_by_name (abfd, sname) == NULL) {
sprintf (sname, "%s.%s.%u", prefix, flavourstr, j);
if (bfd_get_section_by_name (abfd, sname) == NULL)
break;
}
i++;
j++;
}
bfdsec = bfd_make_section (abfd, sname);