Red Hat ENTERPRISE LINUX 4 - USING ID Using Manual page 10

Gnu linker
Hide thumbs Also See for ENTERPRISE LINUX 4 - USING ID:
Table of Contents

Advertisement

6
Note--if the linker is being invoked indirectly, via a compiler driver (e.g.
mand line options should be prefixed by
driver) like this:
gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
This is important, because otherwise the compiler driver program may silently drop the linker options,
resulting in a bad link.
Here is a table of the generic command line switches accepted by the GNU linker:
-a
keyword
This option is supported for HP/UX compatibility. The
strings
archive
and the other two keywords are functionally equivalent to
any number of times.
-A
architecture
architecture
-architecture=
architecture
In the current release of
that
configuration, the
ld
960 family, enabling some safeguards and modifying the archive-library search path. Refer to
Section 5.2
and the Intel 960 Family, for details.
ld
Future releases of
-b
input-format
-format=
input-format
may be configured to support more than one kind of object file. If your
ld
way, you can use the
option on the command line. Even when
you don't usually need to specify this, as
format the most usual format on each machine.
particular format supported by the BFD libraries. (You can list the available binary formats with
.) Chapter 6 BFD.
objdump -i
You may want to use this option if you are linking files with an unusual binary format. You
can also use
-b
including
-b
input-format
The default format is taken from the environment variable
Variables. You can also define the input format from a script, using the command
Section 4.4.3 Commands Dealing with Object File Formats.
-c
MRI-commandfile
-mri-script=
MRI-commandfile
For compatibility with linkers produced by MRI,
restricted command language, described in Appendix A MRI Compatible Script Files. Introduce
MRI script files with the option
purpose
scripting language. If
ld
specified by any
-Wl,
,
, or
shared
default
, this option is useful only for the Intel 960 family of architectures. In
ld
architecture
may support similar functionality for other architecture families.
ld
option to specify the binary format for input object files that follow this
-b
to switch formats explicitly (when linking object files of different formats), by
before each group of object files in a particular format.
; use the
-c
MRI-cmdfile
options.
-L
(or whatever is appropriate for the particular compiler
keyword
.
is functionally equivalent to
-aarchive
-Bdynamic
argument identifies the particular architecture in the
is configured to support alternative object formats,
ld
should be configured to expect as a default input
ld
input-format
GNUTARGET
accepts script files written in an alternate,
ld
option to run linker scripts written in the general-
-T
does not exist,
Chapter 3. Invocation
) then all the linker com-
gcc
argument must be one of the
-Bstatic
. This option may be used
is configured this
ld
is a text string, the name of a
. Section 3.2 Environment
TARGET
looks for it in the directories
ld
,
; see

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 4 - USING ID and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Enterprise linux 4

Table of Contents