[PATCH] New --pe-dll-characteristcs switch for PE ld.

Charles Wilson cygwin@cwilson.fastmail.fm
Mon Mar 9 15:58:00 GMT 2009

> The ld option would not represent a mask.  It is just an arbitrary collection
> of keyworeds.  You are grouping suboptions together only because Microsoft 
> decided to have disparate behavior controlled by one unsigned short field
> in the PE header.

Ah. I see what the problem is.

Dave and I are thinking: "There is an important field in the EXE/DLL
header.  We need a way to conveniently set the value of this field. 
Since the field is composed of various flags, one obvious convenient
mechanism is to allow setting those flags in the field symbolically.  Or
also numerically, all at once.  But, the operation is one atomic
transaction: set the field."

This naturally leads to a single command line option (for the field),
with parseable suboptions (for each flag).

You're thinking: "There are a number of flags that are important in the
EXE/DLL header.  We should be able to set those flags.  These flags are
each independent logical entities -- regardless of how Microsoft
implemented them in the PE header itself, as bit-members of a single
field, multiple fields, whatever.  The ld user doesn't care -- he just
needs to be able to set each flag."

This naturally leads to multiple command line options -- one for each

I can see the argument for both.  Can't we have both?


More information about the Binutils mailing list