Fix PE dll -auto-import breakage from enforcing PE specs for section flags

Dmitry Semyonov Dmitry.Semyonov@oktet.ru
Fri Jan 30 12:40:00 GMT 2004


Hello Danny, Nick, et al.

On Sat, 17 Jan 2004, Danny Smith wrote:

> > > 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.

> 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.

Partial linking (-r) implies --omagic, and therefore also unsets WP_TEXT
flag. Do you know why it is necessary?

I can use '-r --no-omagic' to force WP_TEXT to be set during partial
linking. Do you think it is safe?


...Bye..Dmitry.



More information about the Binutils mailing list