* windres.c (main): Quit if we didn't get any resources.
* rescoff.c (write_coff_file): Don't free the relocation array until after we've closed the BFD.
This commit is contained in:
parent
907672ebb2
commit
d5a7bb530d
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Jun 26 13:53:17 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* windres.c (main): Quit if we didn't get any resources.
|
||||||
|
* rescoff.c (write_coff_file): Don't free the relocation array
|
||||||
|
until after we've closed the BFD.
|
||||||
|
|
||||||
Wed Jun 25 20:57:06 1997 Ian Lance Taylor <ian@cygnus.com>
|
Wed Jun 25 20:57:06 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* resbin.c: New file.
|
* resbin.c: New file.
|
||||||
|
|
|
@ -531,9 +531,6 @@ write_coff_file (filename, target, resources)
|
||||||
|
|
||||||
bfd_set_reloc (abfd, sec, cwi.relocs, cwi.reloc_count);
|
bfd_set_reloc (abfd, sec, cwi.relocs, cwi.reloc_count);
|
||||||
|
|
||||||
/* We allocated the relocs array using malloc. */
|
|
||||||
free (cwi.relocs);
|
|
||||||
|
|
||||||
offset = 0;
|
offset = 0;
|
||||||
for (d = cwi.dirs.d; d != NULL; d = d->next)
|
for (d = cwi.dirs.d; d != NULL; d = d->next)
|
||||||
{
|
{
|
||||||
|
@ -564,6 +561,9 @@ write_coff_file (filename, target, resources)
|
||||||
|
|
||||||
if (! bfd_close (abfd))
|
if (! bfd_close (abfd))
|
||||||
bfd_fatal ("bfd_close");
|
bfd_fatal ("bfd_close");
|
||||||
|
|
||||||
|
/* We allocated the relocs array using malloc. */
|
||||||
|
free (cwi.relocs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Work out the sizes of the various fixed size resource directory
|
/* Work out the sizes of the various fixed size resource directory
|
||||||
|
|
|
@ -960,6 +960,9 @@ main (argc, argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resources == NULL)
|
||||||
|
fatal ("no resources");
|
||||||
|
|
||||||
/* Sort the resources. This is required for COFF, convenient for
|
/* Sort the resources. This is required for COFF, convenient for
|
||||||
rc, and unimportant for res. */
|
rc, and unimportant for res. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue