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:

> I don't see any reason for a user to have to remember two things
> (--dll-characteristics something) when they could just use --something.
> If implemented as a simple option, you could get useful information from
> --help, and you wouldn't have to invent a new way of parsing options.

  The syntax isn't unprecedented, there are three other options that take an
comma-separated list for the argument.  (I added a couple of other separators
that made sense because there may be integers present.  I also took as an
example the strace --mask syntax.)

> And, if we name the options similarly to Microsoft's link command (and
> there is certainly precedent for ld accommodating other linker's
> arguments) we might even make it slightly easier for people who are
> familiar with Microsoft's tools to use ours.

  Well, a follow-on patch could add a bunch of synonyms very easily: make them
non-argument options, call into set_pe_value_from_flags with optarg still
pointing at the option name itself, add matching entries to dllchrctnames[],
and make the operation of set_pe_value_from_flags cumulative by changing the
last line:

-  set_pe_name (name,  flags);
+  set_pe_name (name,  flags | (init->inited ? init->value : 0));

    cheers,
      DaveK


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