produced by MRI, ld accepts script files written in an alternate, restricted command language, described in the MRI Compatible Script Files section of GNU ld documentation.
Introduce MRI script files with the option -c; use the -T option to run linker scripts written in the general‐purpose ld scripting language. If MRI‐cmdfile does not exist, ld looks for it in the directories
specified by any -L options.
-d
-dc
-dp These three options are equivalent; multiple forms are supported for compatibility with other linkers. They assign space to common symbols even if a relocatable output file is specified (with -r). The script
command "FORCE_COMMON_ALLOCATION" has the same effect.
--depaudit AUDITLIB
-P AUDITLIB
Adds AUDITLIB to the "DT_DEPAUDIT" entry of the dynamic section. AUDITLIB is not checked for existence, nor will it use the DT_SONAME specified in the library. If specified multiple times "DT_DEPAUDIT" will
contain a colon separated list of audit interfaces to use. This option is only meaningful on ELF platforms supporting the rtld‐audit interface. The -P option is provided for Solaris compatibility.
--enable-linker-version
Enables the "LINKER_VERSION" linker script directive, described in Output Section Data. If this directive is used in a linker script and this option has been enabled then a string containing the linker version
will be inserted at the current point.
Note - this location of this option on the linker command line is significant. It will only affect linker scripts that come after it on the command line, or which are built into the linker.
--disable-linker-version
Disables the "LINKER_VERSION" linker script directive, so that it does not insert a version string. This is the default.
--enable-non-contiguous-regions
This option avoids generating an error if an input section does not fit a matching output section. The linker tries to allocate the input section to subseque nt matching output sections, and generates an error
only if no output section is large enough. This is useful when several non‐contiguous memory regions are available and the input section does not require a particular one. The order in which input sections are
evaluated does not change, for instance:
MEMORY {
MEM1 (rwx) : ORIGIN = 0x1000, LENGTH = 0x14
MEM2 (rwx) : ORIGIN = 0x1000, LENGTH = 0x40
MEM3 (rwx) : ORIGIN = 0x2000, LENGTH = 0x40
}
SECTIONS {
mem1 : { *(.data.*); } > MEM1
mem2 : { *(.data.*); } > MEM2
mem3 : { *(.data.*); } > MEM3
}
with input sections:
.data.1: size 8
.data.2: size 0x10
.data.3: size 4
results in .data.1 affected to mem1, and .data.2 and .data.3
affected to mem2, even though .data.3 would fit in mem3.
This option is incompatible with INSERT statements because it changes the way input sections are mapped to output sections.
--enable-non-contiguous-regions-warnings
This option enables warnings when "--enable-non-contiguous-regions" allows possibly unexpected matches in sections mapping, potentially leading to silently discarding a section instead of failing because it does
not fit any output region.
-e entry
--entry=entry
Use entry as the explicit symbol for beginning execution of your program, rather than the default entry point. If there is no symbol named entry, the linker will try to parse entry as a number, and use that as
the entry address (the number will