[patch 2/4] Fix go32 stub preservation by objcopy
Nick Clifton
nickc@redhat.com
Mon Aug 10 15:02:00 GMT 2009
Hi Jan,
> bfd/
> 2009-08-09 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Fix go32 stub preservation by objcopy.
> * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
> (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
> go32stub.
>
> ld/testsuite/
> 2009-08-09 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Test go32 stub preservation by objcopy.
> * ld-i386/i386.exp (go32 stub, go32 stub patch the source)
> (go32 stub objcopy, go32 stub comparison after objcopy): New.
Approved - please apply - but:
> - /* Save now the stub to be used later. */
> - bfd_coff_go32stub (abfd) = (PTR) bfd_alloc (abfd, (bfd_size_type) STUBSIZE);
> + /* Save now the stub to be used later. FIXME: Memory leak as the caller
> + coff_object_p does bfd_release afterwards. */
> + bfd_coff_go32stub (abfd) = (PTR) bfd_malloc ((bfd_size_type) STUBSIZE);
The use of the PTR macro is deprecated. Please either remove it, if it
is unnecessary or replace it with "void *" where it is necessary.
Cheers
Nick
More information about the Binutils
mailing list