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: tidy documentation of ld command-line option syntax


Sandra Loosemore wrote:
> We've noticed that users have a hard time figuring out how to pass
> linker options that take arguments on the gcc command line, using
> -Xlinker or -Wl. When options are documented in the ld manual as
> "--option value", from gcc you have to do "-Xlinker --option -Xlinker
> value" or "-Wl,--option,value" to get that effect, and that seems to
> really confuse people.
> 
> OTOH, ld already defines that "--option=value" is equivalent to
> "--option value" for all long options, and from the gcc command line,
> this is much less user-error-prone; you can just say the obvious
> "-Xlinker --option=value" or "-Wl,--option=value".  While the
> "--option=value" syntax is already discussed generally in the ld manual,
> and many ld command-line options are already documented that way,
> several others are not.  This patch fixes the documentation of those
> remaining long options to consistently use the "--option=value" syntax.

  I would have preferred if you didn't actually conceal the existence of the
"--option value" form but just added the "--option=value" form where missing.
 That might be confusing to anyone who is familiar with standard getopt()
behaviour.  Did you consider and decide against doing it that way for some reason?

    cheers,
      DaveK



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