aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-09-29 12:57:54 +0000
committerAlan Modra <amodra@gmail.com>2001-09-29 12:57:54 +0000
commit4818e05fe52eb069d4ae6b306a31b5ecf0e1a6fd (patch)
tree20bd3d7ae9a352be8c4003ccf8f4b855c3d1891a /ld/ld.texinfo
parent862517b6506a76ce9dc0e06b8f1d98577371e3b4 (diff)
downloadgdb-4818e05fe52eb069d4ae6b306a31b5ecf0e1a6fd.zip
gdb-4818e05fe52eb069d4ae6b306a31b5ecf0e1a6fd.tar.gz
gdb-4818e05fe52eb069d4ae6b306a31b5ecf0e1a6fd.tar.bz2
From John Reiser <jreiser@BitWagon.com>
* ldlang.c (lang_common): Conditionally inhibit Common allocation. * lexsup.c: Add --no-define-common commandline option. * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command. * ldlex.l: Likewise. * ld.h: Add command_line.inhibit_common_definition. * ldmain.c (main): Initialize. * ld.texinfo: Document.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo25
1 files changed, 25 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 2d04a57..0b67ae1 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -950,6 +950,24 @@ sorted by name. For each symbol, a list of file names is given. If the
symbol is defined, the first file listed is the location of the
definition. The remaining files contain references to the symbol.
+@cindex common allocation
+@kindex --no-define-common
+@item --no-define-common
+This option inhibits the assignment of addresses to common symbols.
+The script command @code{INHIBIT_COMMON_ALLOCATION} has the same effect.
+@xref{Miscellaneous Commands}.
+
+The @samp{--no-define-common} option allows decoupling
+the decision to assign addresses to Common symbols from the choice
+of the output file type; otherwise a non-Relocatable output type
+forces assigning addresses to Common symbols.
+Using @samp{--no-define-common} allows Common symbols that are referenced
+from a shared library to be assigned addresses only in the main program.
+This eliminates the unused duplicate space in the shared library,
+and also prevents any possible confusion over resolving to the wrong
+duplicate when there are many dynamic modules with specialized search
+paths for runtime symbol resolution.
+
@cindex symbols, from command line
@kindex --defsym @var{symbol}=@var{exp}
@item --defsym @var{symbol}=@var{expression}
@@ -2311,6 +2329,13 @@ This command has the same effect as the @samp{-d} command-line option:
to make @code{ld} assign space to common symbols even if a relocatable
output file is specified (@samp{-r}).
+@item INHIBIT_COMMON_ALLOCATION
+@kindex INHIBIT_COMMON_ALLOCATION
+@cindex common allocation in linker script
+This command has the same effect as the @samp{--no-define-common}
+command-line option: to make @code{ld} omit the assignment of addresses
+to common symbols even for a non-relocatable output file.
+
@item NOCROSSREFS(@var{section} @var{section} @dots{})
@kindex NOCROSSREFS(@var{sections})
@cindex cross references