ld: Environment
1
1 2.2 Environment Variables
1 =========================
1
1 You can change the behaviour of 'ld' with the environment variables
1 'GNUTARGET', 'LDEMULATION' and 'COLLECT_NO_DEMANGLE'.
1
1 'GNUTARGET' determines the input-file object format if you don't use
1 '-b' (or its synonym '--format'). Its value should be one of the BFD
1 names for an input format (⇒BFD). If there is no 'GNUTARGET' in
1 the environment, 'ld' uses the natural format of the target. If
1 'GNUTARGET' is set to 'default' then BFD attempts to discover the input
1 format by examining binary input files; this method often succeeds, but
1 there are potential ambiguities, since there is no method of ensuring
1 that the magic number used to specify object-file formats is unique.
1 However, the configuration procedure for BFD on each system places the
1 conventional format for that system first in the search-list, so
1 ambiguities are resolved in favor of convention.
1
1 'LDEMULATION' determines the default emulation if you don't use the
1 '-m' option. The emulation can affect various aspects of linker
1 behaviour, particularly the default linker script. You can list the
1 available emulations with the '--verbose' or '-V' options. If the '-m'
1 option is not used, and the 'LDEMULATION' environment variable is not
1 defined, the default emulation depends upon how the linker was
1 configured.
1
1 Normally, the linker will default to demangling symbols. However, if
1 'COLLECT_NO_DEMANGLE' is set in the environment, then it will default to
1 not demangling symbols. This environment variable is used in a similar
1 fashion by the 'gcc' linker wrapper program. The default may be
1 overridden by the '--demangle' and '--no-demangle' options.
1