This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: tidy documentation of ld command-line option syntax
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. 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.
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.
cheers,
DaveK
diff -pu orig/ld.texinfo new/ld.texinfo
--- orig/ld.texinfo 2009-02-24 03:59:38.000000000 +0000
+++ new/ld.texinfo 2009-02-24 03:59:48.000000000 +0000
@@ -465,10 +465,10 @@ base 10; you may use a leading @samp{0x}
and other ways of specifying the entry point.
@kindex --exclude-libs
-@item --exclude-libs @var{lib},@var{lib},...
+@item --exclude-libs=@var{lib}[,@var{lib}[,...]]
Specifies a list of archive libraries from which symbols should not be automatically
exported. The library names may be delimited by commas or colons. Specifying
-@code{--exclude-libs ALL} excludes symbols in all archive libraries from
+@code{--exclude-libs=ALL} excludes symbols in all archive libraries from
automatic export. This option is available only for the i386 PE targeted
port of the linker and for ELF targeted ports. For i386 PE, symbols
explicitly listed in a .def file are still exported, regardless of this
@@ -476,7 +476,7 @@ option. For ELF targeted ports, symbols
be treated as hidden.
@kindex --exclude-modules-for-implib
-@item --exclude-modules-for-implib @var{module},@var{module},...
+@item --exclude-modules-for-implib=@var{module}[,@var{module}[,...]]
Specifies a list of object files or archive members, from which symbols
should not be automatically exported, but which should be copied wholesale
into the import library being generated during the link. The module names
@@ -2098,7 +2098,7 @@ as-is and also with the suffix stripped.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --base-file
-@item --base-file @var{file}
+@item --base-file=@var{file}
Use @var{file} as the name of a file in which to save the base
addresses of all the relocations needed for generating DLLs with
@file{dlltool}.
@@ -2174,7 +2174,7 @@ These cygwin-excludes are: @code{_cygwin
[This option is specific to the i386 PE targeted port of the linker]
@kindex --exclude-symbols
-@item --exclude-symbols @var{symbol},@var{symbol},...
+@item --exclude-symbols=@var{symbol}[,@var{symbol}[,...]]
Specifies a list of symbols which should not be automatically
exported. The symbol names may be delimited by commas or colons.
[This option is specific to the i386 PE targeted port of the linker]
@@ -2188,8 +2188,8 @@ file offsets which are multiples of this
@cindex heap size
@kindex --heap
-@item --heap @var{reserve}
-@itemx --heap @var{reserve},@var{commit}
+@item --heap=@var{reserve}
+@itemx --heap=@var{reserve},@var{commit}
Specify the number of bytes of memory to reserve (and optionally commit)
to be used as heap for this program. The default is 1Mb reserved, 4K
committed.
@@ -2197,7 +2197,7 @@ committed.
@cindex image base
@kindex --image-base
-@item --image-base @var{value}
+@item --image-base=@var{value}
Use @var{value} as the base address of your program or dll. This is
the lowest memory location that will be used when your program or dll
is loaded. To reduce the need to relocate and improve performance of
@@ -2222,39 +2222,39 @@ section of the BOOT.INI. Otherwise, thi
[This option is specific to PE targeted ports of the linker]
@kindex --major-image-version
-@item --major-image-version @var{value}
+@item --major-image-version=@var{value}
Sets the major number of the ``image version''. Defaults to 1.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --major-os-version
-@item --major-os-version @var{value}
+@item --major-os-version=@var{value}
Sets the major number of the ``os version''. Defaults to 4.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --major-subsystem-version
-@item --major-subsystem-version @var{value}
+@item --major-subsystem-version=@var{value}
Sets the major number of the ``subsystem version''. Defaults to 4.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --minor-image-version
-@item --minor-image-version @var{value}
+@item --minor-image-version=@var{value}
Sets the minor number of the ``image version''. Defaults to 0.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --minor-os-version
-@item --minor-os-version @var{value}
+@item --minor-os-version=@var{value}
Sets the minor number of the ``os version''. Defaults to 0.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --minor-subsystem-version
-@item --minor-subsystem-version @var{value}
+@item --minor-subsystem-version=@var{value}
Sets the minor number of the ``subsystem version''. Defaults to 0.
[This option is specific to the i386 PE targeted port of the linker]
@cindex DEF files, creating
@cindex DLLs, creating
@kindex --output-def
-@item --output-def @var{file}
+@item --output-def=@var{file}
The linker will create the file @var{file} which will contain a DEF
file corresponding to the DLL the linker is generating. This DEF file
(which should be called @code{*.def}) may be used to create an import
@@ -2264,7 +2264,7 @@ automatically or implicitly exported sym
@cindex DLLs, creating
@kindex --out-implib
-@item --out-implib @var{file}
+@item --out-implib=@var{file}
The linker will create the file @var{file} which will contain an
import lib corresponding to the DLL the linker is generating. This
import lib (which should be called @code{*.dll.a} or @code{*.a}
@@ -2291,7 +2291,7 @@ default.
@cindex DLLs, linking to
@kindex --dll-search-prefix
-@item --dll-search-prefix @var{string}
+@item --dll-search-prefix=@var{string}
When linking dynamically to a dll without an import library,
search for @code{<string><basename>.dll} in preference to
@code{lib<basename>.dll}. This behaviour allows easy distinction
@@ -2464,17 +2464,17 @@ addresses which are a multiple of this n
@cindex stack size
@kindex --stack
-@item --stack @var{reserve}
-@itemx --stack @var{reserve},@var{commit}
+@item --stack=@var{reserve}
+@itemx --stack=@var{reserve},@var{commit}
Specify the number of bytes of memory to reserve (and optionally commit)
to be used as stack for this program. The default is 2Mb reserved, 4K
committed.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --subsystem
-@item --subsystem @var{which}
-@itemx --subsystem @var{which}:@var{major}
-@itemx --subsystem @var{which}:@var{major}.@var{minor}
+@item --subsystem=@var{which}
+@itemx --subsystem=@var{which}:@var{major}
+@itemx --subsystem=@var{which}:@var{major}.@var{minor}
Specifies the subsystem under which your program will execute. The
legal values for @var{which} are @code{native}, @code{windows},
@code{console}, @code{posix}, and @code{xbox}. You may optionally set
@@ -2503,7 +2503,7 @@ is generated for each far function which
instruction (this happens when a pointer to a far function is taken).
@kindex --bank-window
-@item --bank-window @var{name}
+@item --bank-window=@var{name}
This option indicates to the linker the name of the memory region in
the @samp{MEMORY} specification that describes the memory bank window.
The definition of such region is then used by the linker to compute