Red Hat ENTERPRISE LINUX 3 - USING ID Using Instructions page 14

Using ld, the gnu linker
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING ID:
Table of Contents

Advertisement

10
-n
-nmagic
Turn off page alignment of sections, and mark the output as
-N
-omagic
Set the text and data sections to be readable and writable. Also, do not page-align the data seg-
ment, and disable linking against shared libraries. If the output format supports Unix style magic
numbers, mark the output as
-no-omagic
This option negates most of the effects of the
and forces the data segment to be page-aligned. Note - this option does not enable linking against
shared libraries. Use
-o
output
-output=
output
Use
as the name for the program produced by
output
is used by default. The script command
a.out
-O
level
If
is a numeric values greater than zero
level
cantly longer and therefore probably should only be enabled for the final binary.
-q
-emit-relocs
Leave relocation sections and contents in fully linked exececutables. Post link analysis and op-
timization tools may need this information in order to perform correct modifications of executa-
bles. This results in larger executables.
This option is currently only supported on ELF platforms.
-r
-relocateable
Generate relocatable output--i.e., generate an output file that can in turn serve as input to
This is often called partial linking. As a side effect, in environments that support standard Unix
magic numbers, this option also sets the output file's magic number to
is not specified, an absolute file is produced. When linking C++ programs, this option will not
resolve references to constructors; to do that, use
When an input file does not have the same format as the output file, partial linking is only sup-
ported if that input file does not contain any relocations. Different output formats can have further
restrictions; for example some
in other formats at all.
This option does the same thing as
.
OMAGIC
for this.
-Bdynamic
-based formats do not support partial linking with input files
a.out
.
-i
NMAGIC
option. It sets the text section to be read-only,
-N
; if this option is not specified, the name
ld
can also specify the output file name.
OUTPUT
optimizes the output. This might take signifi-
ld
.
-Ur
Chapter 3. Invocation
if possible.
. If this option
OMAGIC
.
ld

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents