This is the mail archive of the binutils@sourceware.org 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] New --pe-dll-characteristcs switch for PE ld.


Christopher Faylor wrote:
> On Thu, Mar 05, 2009 at 12:58:39PM +0000, Dave Korn wrote:
>> The PE header in executables contains a field called
>> "DllCharacteristics", which contains various flags that inform the OS
>> dynamic loader about the status of the executable w.r.t.  runtime
>> factors such as NX/DEP, ASLR, dynamic rebasing, etc.  (Despite the
>> name, it applies to executables of all kinds, not just DLLs, but that's
>> what MS calls it so that's what I call it).
> 
> And, as I mentioned in the Cygwin mailing list, "despite the name", I
> don't think the option should mention "dll".  The name of the option
> doesn't have to mirror an internal define.

  Well, whatever alternative suggestion you can come up with is probably
something I'd grudgingly accept, but it has to avoid any confusion with the
"Characteristics" field that also exists in PE file headers.  And I remain
allergic to making up new names for things that already have existing standard
names on general principle.  I don't think it's entirely correct to call it an
"internal define": it's a documented name in an open standard.

> I wonder if the name "pe-" is even TMI for this option but at least
> there is some precedent for that.

  Actually looking at the other header-related options convinces me that it is.

`--major-image-version VALUE'
`--major-os-version VALUE'
`--major-subsystem-version VALUE'
`--minor-image-version VALUE'
`--minor-os-version VALUE'
`--minor-subsystem-version VALUE'
`--stack RESERVE'
`--stack RESERVE,COMMIT'
`--subsystem WHICH'
`--subsystem WHICH:MAJOR'
`--subsystem WHICH:MAJOR.MINOR'
`--heap RESERVE'
`--heap RESERVE,COMMIT'
`--image-base VALUE'

  It's only the extra debug option that mentions pe by name.  So if it was my
choice I'd now want to call the flag "--dll-characteristics".  Do you or any
of the other regular maintainers have any suggestions?

> I would like to see an objcopy option at some point.  

  Yes, I'm totally going to do that sometime after gcc-4.3.2-2.

    cheers,
      DaveK


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