This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fix PE dll -auto-import breakage from enforcing PEspecs for section flags


Hi Danny,

> '--enable-auto-import' isn't the only problem with enforcing a readonly
> .text section. ld --omagic also break strict PE section flag specs by 
> setting IMAGE_SCN_MEM_WRITE flag on .text.
>
> (objcopy --writable-text would also do the same, but it doesn't appear to
> apply to PE target). 
>
> What about using WP_TEXT file flag (set by default) as a runtime flag?
> ld --omagic already unsets this flag. Make --enable-auto-import do the
> same when it is actually exercised.

Yeah that is a good idea.  I like the patch too.

> As I post, I realize that ld.texi probably needs to include warnings 
> that the use of --enable-auto-import or --omagic will break strict PE specs.
> I'll add those, once this is sorted.

OK, please do that as well.

> bfd/ChangeLog
>
> 2003-01-14  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-14  Danny Smith  <dannysmith@users.sourceforge.net>
>
> 	* pe-dll.c (pe_create_import_fixup): Unset WP_TEXT.

Approved.

Cheers
        Nick
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]