CONSTRUCTORS
CONSTRUCTORS
command specifies where the
linker is to place the data from these sections, relative to the rest of
the linked output. Constructor data is marked by the symbol
__CTOR_LIST__
at the start, and __CTOR_LIST_END
at
the end; destructor data is bracketed similarly, between
__DTOR_LIST__
and __DTOR_LIST_END
. (The compiler
must arrange to actually run this code; GNU C++ calls constructors from
a subroutine __main
, which it inserts automatically into the
startup code for main
, and destructors from _exit
.)
FLOAT
NOFLOAT
ld
doesn't use the keywords, assuming
instead that any necessary subroutines are in libraries specified using
the general mechanisms for linking to archives; but to permit the use of
scripts that were written for the older linkers, the keywords
FLOAT
and NOFLOAT
are accepted and ignored.
FORCE_COMMON_ALLOCATION
ld
assign space to common symbols even if a relocatable
output file is specified (`-r').
INPUT ( file, file, ... )
INPUT ( file file ... )
ld
searches for each file through the archive-library
search path, just as for files you specify on the command line.
See the description of `-L' in section Command Line Options.
If you use `-lfile', ld
will transform the name to
libfile.a
as with the command line argument `-l'.
GROUP ( file, file, ... )
GROUP ( file file ... )
INPUT
, except that the named files should
all be archives, and they are searched repeatedly until no new undefined
references are created. See the description of `-(' in
section Command Line Options.
OUTPUT ( filename )
OUTPUT(filename)
is identical to the effect of
`-o filename', which overrides it. You can use this
command to supply a default output-file name other than a.out
.
OUTPUT_ARCH ( bfdname )
OUTPUT_FORMAT
command.
OUTPUT_FORMAT ( bfdname )
ld
is configured to support multiple object code formats,
you can use this command to specify a particular output format.
bfdname is one of the names used by the BFD back-end routines
(see section BFD). The effect is identical to the effect of the
`-oformat' command-line option. This selection affects only
the output file; the related command TARGET
affects primarily
input files.
SEARCH_DIR ( path )
ld
looks for
archive libraries. SEARCH_DIR(path)
has the same
effect as `-Lpath' on the command line.
STARTUP ( filename )
TARGET ( format )
ld
is configured to support multiple object code formats,
you can use this command to change the input-file object code format
(like the command-line option `-b' or its synonym `-format').
The argument format is one of the strings used by BFD to name
binary formats. If TARGET
is specified but OUTPUT_FORMAT
is not, the last TARGET
argument is also used as the default
format for the ld
output file. See section BFD.
If you don't use the TARGET
command, ld
uses the value of
the environment variable GNUTARGET
, if available, to select the
output file format. If that variable is also absent, ld
uses
the default format configured for your machine in the BFD libraries.