This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [Patch] Fix PE dll -auto-import breakage from enforcing PEspecs for section flags
- From: Nick Clifton <nickc at redhat dot com>
- To: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: Tue, 20 Jan 2004 09:41:27 +0000
- Subject: Re: [Patch] Fix PE dll -auto-import breakage from enforcing PEspecs for section flags
- References: <20040116213016.46211.qmail@web61002.mail.yahoo.com>
Hi Danny,
> bfd/ChangeLog
>
> 2003-01-16 Danny Smith <dannysmith@users.sourceforge.net>
>
> * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
> IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
> has been unset.
>
> 1d/ChangeLog
>
> 2003-01-16 Danny Smith <dannysmith@users.sourceforge.net>
>
> * pe-dll.c (pe_create_import_fixup): Unset WP_TEXT.
> * ld.texinfo (--omagic): Note that writable text section
> does not conform to published PE-COFF specs.
> (--enable-auto-import): Likewise.
Approved, please apply.
But ...
> + /* We have defaulted to adding the IMAGE_SCN_MEM_WRITE flag, but now
> + we know exactly what this specific section wants so we remove it
> + and then allow the must_have field to add it back in if necessary.
> + However, we don't remove IMAGE_SCN_MEM_WRITE flag from .text if the
> + default WP_TEXT file flag has been unset. */
Comment formatting - two spaces after full stop. Plus I would suggest
adding a sentence that explains that WP_TEXT can be set for example
when auto-import is active.
Cheers
Nick