PATCH: tidy documentation of ld command-line option syntax

Sandra Loosemore sandra@codesourcery.com
Tue Feb 24 13:38:00 GMT 2009


Dave Korn wrote:
> Sandra Loosemore wrote:
> 
>> OK.  How's this version of the patch?
> 
>   Looks nice, but I spotted a couple of long options that you missed:
> 
> `--exclude-libs LIB,LIB,...'
> `--exclude-modules-for-implib MODULE,MODULE,...'
> 
> and in the target-specific areas a bunch more.  

I mentioned in my original post that I was working off the common option list in 
lexsup.c.  It seems to me that, for options that are specific to a particular 
emulation mode, the syntax given in the docs should agree with the syntax for 
whatever linker ld is trying to emulate, and any changes from what's there now 
in the docs must at least be checked to match the internal implementation, as I 
did for the common options.

> Here's a patch that applies on
> top of yours to catch the ones I noticed.  (It also catches a couple of
> missing '[ ... ]' pairs which I spotted while I was about it).  Tested the
> combined lot with "make info pdf html" and it all looked ok.

These changes look OK to me from a purely document-formatting point of view, but 
did you check the implementation?

>   I also wondered whether the -Bstatic, -Bdynamic etc. options should be
> considered "-B OPTION".  Then again, that wouldn't make sense for the
> -Txxx=yyy options, so I decided not to do anything to them in the end.

In fact, -Bstatic, -Bdynamic, etc are implemented as long options, so 
documenting them as "-B OPTION" would be incorrect.

Anyway, I think we've reached convergence on the direction to take here, and 
what we've got so far is at least an incremental improvement over the existing 
text.  How about I commit my last patch, either with or without your further 
additions, and then we can make any further tweaks on top of that?  (Actually, 
when I started out, I would've been happy just with changing the documented 
syntax of -Map, since that's the one that seems to trip up people all the 
time....  this wasn't intended to turn into an overhaul of the entire manual.... 
  :-P)

-Sandra



More information about the Binutils mailing list