\input texinfo
@setfilename ld.info
-@c Copyright (C) 1991-2017 Free Software Foundation, Inc.
+@c Copyright (C) 1991-2018 Free Software Foundation, Inc.
@syncodeindex ky cp
@c man begin INCLUDE
@include configdoc.texi
@set C6X
@set H8300
@set HPPA
-@set I960
@set M68HC11
@set M68K
@set MIPS
@set POWERPC
@set POWERPC64
@set Renesas
+@set S/390
@set SPU
@set TICOFF
@set WIN32
@end ifset
version @value{VERSION}.
-Copyright @copyright{} 1991-2017 Free Software Foundation, Inc.
+Copyright @copyright{} 1991-2018 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@vskip 0pt plus 1filll
@c man begin COPYRIGHT
-Copyright @copyright{} 1991-2017 Free Software Foundation, Inc.
+Copyright @copyright{} 1991-2018 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@ifset Renesas
* Renesas:: ld and other Renesas micros
@end ifset
-@ifset I960
-* i960:: ld and the Intel 960 family
-@end ifset
@ifset ARM
* ARM:: ld and the ARM family
@end ifset
@ifset POWERPC64
* PowerPC64 ELF64:: ld and PowerPC64 64-bit ELF Support
@end ifset
+@ifset S/390
+* S/390 ELF:: ld and S/390 ELF Support
+@end ifset
@ifset SPU
* SPU ELF:: ld and SPU ELF Support
@end ifset
This option is only meaningful on ELF platforms supporting the rtld-audit
interface.
-@ifset I960
-@cindex architectures
-@kindex -A @var{arch}
-@item -A @var{architecture}
-@kindex --architecture=@var{arch}
-@itemx --architecture=@var{architecture}
-In the current release of @command{ld}, this option is useful only for the
-Intel 960 family of architectures. In that @command{ld} configuration, the
-@var{architecture} argument identifies the particular architecture in
-the 960 family, enabling some safeguards and modifying the
-archive-library search path. @xref{i960,,@command{ld} and the Intel 960
-family}, for details.
-
-Future releases of @command{ld} may support similar functionality for
-other architecture families.
-@end ifset
-
@ifclear SingleFormat
@cindex binary input format
@kindex -b @var{format}
how @command{ld} searches for a linker script unless @option{-T}
option is specified.
-If @var{searchdir} begins with @code{=}, then the @code{=} will be replaced
-by the @dfn{sysroot prefix}, controlled by the @samp{--sysroot} option, or
-specified when the linker is configured.
+If @var{searchdir} begins with @code{=} or @code{$SYSROOT}, then this
+prefix will be replaced by the @dfn{sysroot prefix}, controlled by the
+@samp{--sysroot} option, or specified when the linker is configured.
@ifset UsesEnvVars
The default set of paths searched (without being specified with
those commands to make use of a compiler based plugin it must first be
copied into the @file{$@{libdir@}/bfd-plugins} directory. All gcc
based linker plugins are backward compatible, so it is sufficient to
-just copy in the newest one.
+just copy in the newest one.
@kindex --push-state
@cindex push state governing input file handling
@item place
Orphan sections are placed into a suitable output section following
the strategy described in @ref{Orphan Sections}. The option
-@samp{--unique} also effects how sections are placed.
+@samp{--unique} also affects how sections are placed.
@item discard
All orphan sections are discarded, by placing them in the
The recognized keywords are:
@table @samp
+@item bndplt
+Always generate BND prefix in PLT entries. Supported for Linux/x86_64.
+
+@item call-nop=prefix-addr
+@itemx call-nop=suffix-nop
+@itemx call-nop=prefix-@var{byte}
+@itemx call-nop=suffix-@var{byte}
+Specify the 1-byte @code{NOP} padding when transforming indirect call
+to a locally defined function, foo, via its GOT slot.
+@option{call-nop=prefix-addr} generates @code{0x67 call foo}.
+@option{call-nop=suffix-nop} generates @code{call foo 0x90}.
+@option{call-nop=prefix-@var{byte}} generates @code{@var{byte} call foo}.
+@option{call-nop=suffix-@var{byte}} generates @code{call foo @var{byte}}.
+Supported for i386 and x86_64.
+
@item combreloc
-Combines multiple reloc sections and sorts them to make dynamic symbol
-lookup caching possible.
+@itemx nocombreloc
+Combine multiple dynamic relocation sections and sort to improve
+dynamic symbol lookup caching. Do not do this if @samp{nocombreloc}.
@item common
-Generate common symbols with the STT_COMMON type druing a relocatable
-link.
+@itemx nocommon
+Generate common symbols with STT_COMMON type during a relocatable
+link. Use STT_OBJECT type if @samp{nocommon}.
+
+@item common-page-size=@var{value}
+Set the page size most commonly used to @var{value}. Memory image
+layout will be optimized to minimize memory pages if the system is
+using pages of this size.
@item defs
-Disallows undefined symbols in object files. Undefined symbols in
-shared libraries are still allowed.
+Report unresolved symbol references from regular object files. This
+is done even if the linker is creating a non-symbolic shared library.
+This option is the inverse of @samp{-z undefs}.
+
+@item dynamic-undefined-weak
+@itemx nodynamic-undefined-weak
+Make undefined weak symbols dynamic when building a dynamic object,
+if they are referenced from a regular object file and not forced local
+by symbol visibility or versioning. Do not make them dynamic if
+@samp{nodynamic-undefined-weak}. If neither option is given, a target
+may default to either option being in force, or make some other
+selection of undefined weak symbols dynamic. Not all targets support
+these options.
@item execstack
Marks the object as requiring executable stack.
the symbols defined by this shared object available for symbol resolution
of subsequently loaded libraries.
+@item globalaudit
+This option is only meaningful when building a dynamic executable.
+This option marks the executable as requiring global auditing by
+setting the @code{DF_1_GLOBAUDIT} bit in the @code{DT_FLAGS_1} dynamic
+tag. Global auditing requires that any auditing library defined via
+the @option{--depaudit} or @option{-P} command line options be run for
+all dynamic objects loaded by the application.
+
+@item ibtplt
+Generate Intel Indirect Branch Tracking (IBT) enabled PLT entries.
+Supported for Linux/i386 and Linux/x86_64.
+
+@item ibt
+Generate GNU_PROPERTY_X86_FEATURE_1_IBT in .note.gnu.property section
+to indicate compatibility with IBT. This also implies @option{ibtplt}.
+Supported for Linux/i386 and Linux/x86_64.
+
@item initfirst
This option is only meaningful when building a shared object.
It marks the object so that its runtime initialization will occur
objects.
@item interpose
-Marks the object that its symbol table interposes before all symbols
-but the primary executable.
+Specify that the dynamic loader should modify its symbol search order
+so that symbols in this shared library interpose all other shared
+libraries not so marked.
@item lazy
When generating an executable or shared library, mark it to tell the
Lazy binding is the default.
@item loadfltr
-Marks the object that its filters be processed immediately at
-runtime.
-
-@item muldefs
-Allows multiple definitions.
+Specify that the object's filters be processed immediately at runtime.
-@item nocombreloc
-Disables multiple reloc sections combining.
+@item max-page-size=@var{value}
+Set the maximum memory page size supported to @var{value}.
-@item nocommon
-Generate common symbols with the STT_OBJECT type druing a relocatable
-link.
+@item muldefs
+Allow multiple definitions.
@item nocopyreloc
Disable linker generated .dynbss variables used in place of variables
defined in shared libraries. May result in dynamic text relocations.
@item nodefaultlib
-Marks the object that the search for dependencies of this object will
-ignore any default library search paths.
+Specify that the dynamic loader search for dependencies of this object
+should ignore any default library search paths.
@item nodelete
-Marks the object shouldn't be unloaded at runtime.
+Specify that the object shouldn't be unloaded at runtime.
@item nodlopen
-Marks the object not available to @code{dlopen}.
+Specify that the object is not available to @code{dlopen}.
@item nodump
-Marks the object can not be dumped by @code{dldump}.
+Specify that the object can not be dumped by @code{dldump}.
@item noexecstack
Marks the object as not requiring executable stack.
-@item text
-Treat DT_TEXTREL in shared object as error.
-
-@item notext
-Don't treat DT_TEXTREL in shared object as error.
-
-@item textoff
-Don't treat DT_TEXTREL in shared object as error.
+@item noextern-protected-data
+Don't treat protected data symbols as external when building a shared
+library. This option overrides the linker backend default. It can be
+used to work around incorrect relocations against protected data symbols
+generated by compiler. Updates on protected data symbols by another
+module aren't visible to the resulting shared library. Supported for
+i386 and x86-64.
-@item norelro
-Don't create an ELF @code{PT_GNU_RELRO} segment header in the object.
+@item noreloc-overflow
+Disable relocation overflow check. This can be used to disable
+relocation overflow check if there will be no dynamic relocation
+overflow at run-time. Supported for x86_64.
@item now
When generating an executable or shared library, mark it to tell the
dynamic linker to resolve all symbols when the program is started, or
-when the shared library is linked to using dlopen, instead of
-deferring function call resolution to the point when the function is
-first called.
+when the shared library is loaded by dlopen, instead of deferring
+function call resolution to the point when the function is first
+called.
@item origin
-Marks the object may contain $ORIGIN.
+Specify that the object requires @samp{$ORIGIN} handling in paths.
@item relro
-Create an ELF @code{PT_GNU_RELRO} segment header in the object.
-
-@item max-page-size=@var{value}
-Set the emulation maximum page size to @var{value}.
-
-@item common-page-size=@var{value}
-Set the emulation common page size to @var{value}.
+@itemx norelro
+Create an ELF @code{PT_GNU_RELRO} segment header in the object. This
+specifies a memory segment that should be made read-only after
+relocation, if supported. Specifying @samp{common-page-size} smaller
+than the system page size will render this protection ineffective.
+Don't create an ELF @code{PT_GNU_RELRO} segment if @samp{norelro}.
+
+@item separate-code
+@itemx noseparate-code
+Create separate code @code{PT_LOAD} segment header in the object. This
+specifies a memory segment that should contain only instructions and must
+be in wholly disjoint pages from any other data. Don't create separate
+code @code{PT_LOAD} segment if @samp{noseparate-code} is used.
+
+@item shstk
+Generate GNU_PROPERTY_X86_FEATURE_1_SHSTK in .note.gnu.property section
+to indicate compatibility with Intel Shadow Stack. Supported for
+Linux/i386 and Linux/x86_64.
@item stack-size=@var{value}
-Specify a stack size for in an ELF @code{PT_GNU_STACK} segment.
+Specify a stack size for an ELF @code{PT_GNU_STACK} segment.
Specifying zero will override any default non-zero sized
@code{PT_GNU_STACK} segment creation.
-@item bndplt
-Always generate BND prefix in PLT entries. Supported for Linux/x86_64.
-
-@item noextern-protected-data
-Don't treat protected data symbol as external when building shared
-library. This option overrides linker backend default. It can be used
-to workaround incorrect relocations against protected data symbols
-generated by compiler. Updates on protected data symbols by another
-module aren't visible to the resulting shared library. Supported for
-i386 and x86-64.
-
-@item nodynamic-undefined-weak
-Don't treat undefined weak symbols as dynamic when building executable.
-This option overrides linker backend default. It can be used to avoid
-dynamic relocations against undefined weak symbols in executable.
-Supported for i386 and x86-64.
+@item text
+@itemx notext
+@itemx textoff
+Report an error if DT_TEXTREL is set, i.e., if the binary has dynamic
+relocations in read-only sections. Don't report an error if
+@samp{notext} or @samp{textoff}.
-@item noreloc-overflow
-Disable relocation overflow check. This can be used to disable
-relocation overflow check if there will be no dynamic relocation
-overflow at run-time. Supported for x86_64.
-
-@item call-nop=prefix-addr
-@itemx call-nop=prefix-nop
-@itemx call-nop=suffix-nop
-@itemx call-nop=prefix-@var{byte}
-@itemx call-nop=suffix-@var{byte}
-Specify the 1-byte @code{NOP} padding when transforming indirect call
-to a locally defined function, foo, via its GOT slot.
-@option{call-nop=prefix-addr} generates @code{0x67 call foo}.
-@option{call-nop=prefix-nop} generates @code{0x90 call foo}.
-@option{call-nop=suffix-nop} generates @code{call foo 0x90}.
-@option{call-nop=prefix-@var{byte}} generates @code{@var{byte} call foo}.
-@option{call-nop=suffix-@var{byte}} generates @code{call foo @var{byte}}.
-Supported for i386 and x86_64.
+@item undefs
+Do not report unresolved symbol references from regular object files,
+either when creating an executable, or when creating a shared library.
+This option is the inverse of @samp{-z defs}.
@end table
duplicate when there are many dynamic modules with specialized search
paths for runtime symbol resolution.
+@cindex group allocation in linker script
+@cindex section groups
+@cindex COMDAT
+@kindex --force-group-allocation
+@item --force-group-allocation
+This option causes the linker to place section group members like
+normal input sections, and to delete the section groups. This is the
+default behaviour for a final link but this option can be used to
+change the behaviour of a relocatable link (@samp{-r}). The script
+command @code{FORCE_GROUP_ALLOCATION} has the same
+effect. @xref{Miscellaneous Commands}.
+
@cindex symbols, from command line
@kindex --defsym=@var{symbol}=@var{exp}
@item --defsym=@var{symbol}=@var{expression}
is only supported by the @samp{BFIN}, @samp{CR16} and @emph{M68K}
targets.
+@kindex --disable-multiple-abs-defs
+@item --disable-multiple-abs-defs
+Do not allow multiple definitions with symbols included
+in filename invoked by -R or --just-symbols
+
@kindex --fatal-warnings
@kindex --no-fatal-warnings
@item --fatal-warnings
@kindex --no-undefined
@kindex -z defs
+@kindex -z undefs
@item --no-undefined
@itemx -z defs
Report unresolved symbol references from regular object files. This
behaviour for reporting unresolved references found in shared
libraries being linked in.
+The effects of this option can be reverted by using @code{-z undefs}.
+
@kindex --allow-multiple-definition
@kindex -z muldefs
@item --allow-multiple-definition
@ifset H8300
@xref{H8/300,,@command{ld} and the H8/300}.
@end ifset
-@ifset I960
-@xref{i960,, @command{ld} and the Intel 960 family}.
-@end ifset
@ifset XTENSA
@xref{Xtensa,, @command{ld} and Xtensa Processors}.
@end ifset
@kindex --enable-auto-import
@item --enable-auto-import
Do sophisticated linking of @code{_symbol} to @code{__imp__symbol} for
-DATA imports from DLLs, and create the necessary thunking symbols when
-building the import libraries with those DATA exports. Note: Use of the
-'auto-import' extension will cause the text section of the image file
-to be made writable. This does not conform to the PE-COFF format
-specification published by Microsoft.
+DATA imports from DLLs, thus making it possible to bypass the dllimport
+mechanism on the user side and to reference unmangled symbol names.
+[This option is specific to the i386 PE targeted port of the linker]
+
+The following remarks pertain to the original implementation of the
+feature and are obsolete nowadays for Cygwin and MinGW targets.
+
+Note: Use of the 'auto-import' extension will cause the text section
+of the image file to be made writable. This does not conform to the
+PE-COFF format specification published by Microsoft.
Note - use of the 'auto-import' extension will also cause read only
data which would normally be placed into the .rdata section to be
library to use a functional interface rather than a data interface
for the offending variables (e.g. set_foo() and get_foo() accessor
functions).
-[This option is specific to the i386 PE targeted port of the linker]
@kindex --disable-auto-import
@item --disable-auto-import
@kindex --disable-runtime-pseudo-reloc
@item --disable-runtime-pseudo-reloc
-Do not create pseudo relocations for non-zero offset DATA imports from
-DLLs.
+Do not create pseudo relocations for non-zero offset DATA imports from DLLs.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --enable-extra-pe-debug
open the file in the current directory. If it is not found, the
linker will search through the archive library search path.
The @dfn{sysroot prefix} can also be forced by specifying @code{=}
-as the first character in the filename path. See also the
-description of @samp{-L} in @ref{Options,,Command Line Options}.
+as the first character in the filename path, or prefixing the filename
+path with @code{$SYSROOT}. See also the description of @samp{-L} in
+@ref{Options,,Command Line Options}.
If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the
name to @code{lib@var{file}.a}, as with the command line argument
command-line option: to make @code{ld} omit the assignment of addresses
to common symbols even for a non-relocatable output file.
+@item FORCE_GROUP_ALLOCATION
+@kindex FORCE_GROUP_ALLOCATION
+@cindex group allocation in linker script
+@cindex section groups
+@cindex COMDAT
+This command has the same effect as the
+@samp{--force-group-allocation} command-line option: to make
+@command{ld} place section group members like normal input sections,
+and to delete the section groups even if a relocatable output file is
+specified (@samp{-r}).
+
@item INSERT [ AFTER | BEFORE ] @var{output_section}
@kindex INSERT
@cindex insert user script into default script
If the program references @samp{etext} but does not define it, the
linker will use the definition in the linker script.
+Note - the @code{PROVIDE} directive considers a common symbol to be
+defined, even though such a symbol could be combined with the symbol
+that the @code{PROVIDE} would create. This is particularly important
+when considering constructor and destructor list symbols such as
+@samp{__CTOR_LIST__} as these are often defined as common symbols.
+
@node PROVIDE_HIDDEN
@subsection PROVIDE_HIDDEN
@cindex PROVIDE_HIDDEN
@end group
@end smallexample
+If an output section's name is the same as the input section's name
+and is representable as a C identifier, then the linker will
+automatically @pxref{PROVIDE} two symbols: __start_SECNAME and
+__stop_SECNAME, where SECNAME is the name of the section. These
+indicate the start address and end address of the output section
+respectively. Note: most section names are not representable as
+C identifiers because they contain a @samp{.} character.
+
@node Output Section Data
@subsection Output Section Data
@cindex data
(@pxref{Options,,Command Line Options}) can be used to control which
output sections an orphan is placed in.
-If an orphaned section's name is representable as a C identifier then
-the linker will automatically @pxref{PROVIDE} two symbols:
-__start_SECNAME and __stop_SECNAME, where SECNAME is the name of the
-section. These indicate the start address and end address of the
-orphaned section respectively. Note: most section names are not
-representable as C identifiers because they contain a @samp{.}
-character.
-
@node Location Counter
@subsection The Location Counter
@kindex .
This expression can only be used directly in @code{SECTIONS} commands, not in
any output section descriptions and only once in the linker script.
@var{commonpagesize} should be less or equal to @var{maxpagesize} and should
-be the system page size the object wants to be optimized for (while still
-working on system page sizes up to @var{maxpagesize}).
+be the system page size the object wants to be optimized for while still
+running on system page sizes up to @var{maxpagesize}. Note however
+that @samp{-z relro} protection will not be effective if the system
+page size is larger than @var{commonpagesize}.
@noindent
Example:
@samp{-z relro} option is used.
When @samp{-z relro} option is not present, @code{DATA_SEGMENT_RELRO_END}
does nothing, otherwise @code{DATA_SEGMENT_ALIGN} is padded so that
-@var{exp} + @var{offset} is aligned to the most commonly used page
-boundary for particular target. If present in the linker script,
-it must always come in between @code{DATA_SEGMENT_ALIGN} and
+@var{exp} + @var{offset} is aligned to the @var{commonpagesize}
+argument given to @code{DATA_SEGMENT_ALIGN}. If present in the linker
+script, it must be placed between @code{DATA_SEGMENT_ALIGN} and
@code{DATA_SEGMENT_END}. Evaluates to the second argument plus any
padding needed at the end of the @code{PT_GNU_RELRO} segment due to
section alignment.
@ifset H8300
* H8/300:: @command{ld} and the H8/300
@end ifset
-@ifset I960
-* i960:: @command{ld} and the Intel 960 family
-@end ifset
@ifset M68HC11
* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
@end ifset
@ifset POWERPC64
* PowerPC64 ELF64:: @command{ld} and PowerPC64 64-bit ELF Support
@end ifset
+@ifset S/390
+* S/390 ELF:: @command{ld} and S/390 ELF Support
+@end ifset
@ifset SPU
* SPU ELF:: @command{ld} and SPU ELF Support
@end ifset
@end ifset
@end ifclear
-@ifset I960
-@ifclear GENERIC
-@raisesections
-@end ifclear
-
-@node i960
-@section @command{ld} and the Intel 960 Family
-
-@cindex i960 support
-
-You can use the @samp{-A@var{architecture}} command line option to
-specify one of the two-letter names identifying members of the 960
-family; the option specifies the desired output target, and warns of any
-incompatible instructions in the input files. It also modifies the
-linker's search strategy for archive libraries, to support the use of
-libraries specific to each particular architecture, by including in the
-search loop names suffixed with the string identifying the architecture.
-
-For example, if your @command{ld} command line included @w{@samp{-ACA}} as
-well as @w{@samp{-ltry}}, the linker would look (in its built-in search
-paths, and in any paths you specify with @samp{-L}) for a library with
-the names
-
-@smallexample
-@group
-try
-libtry.a
-tryca
-libtryca.a
-@end group
-@end smallexample
-
-@noindent
-The first two possibilities would be considered in any event; the last
-two are due to the use of @w{@samp{-ACA}}.
-
-You can meaningfully use @samp{-A} more than once on a command line, since
-the 960 architecture family allows combination of target architectures; each
-use will add another pair of name variants to search for when @w{@samp{-l}}
-specifies a library.
-
-@cindex @option{--relax} on i960
-@cindex relaxing on i960
-@command{ld} supports the @samp{--relax} option for the i960 family. If
-you specify @samp{--relax}, @command{ld} finds all @code{balx} and
-@code{calx} instructions whose targets are within 24 bits, and turns
-them into 24-bit program-counter relative @code{bal} and @code{cal}
-instructions, respectively. @command{ld} also turns @code{cal}
-instructions into @code{bal} instructions when it determines that the
-target subroutine is a leaf routine (that is, the target subroutine does
-not itself call any subroutines).
-
-@ifclear GENERIC
-@lowersections
-@end ifclear
-@end ifset
-
@ifset ARM
@ifclear GENERIC
@raisesections
The last two sections are used by gcc.
@end table
+@table @option
+@cindex MSP430 Options
+@kindex --code-region
+@item --code-region=[either,lower,upper,none]
+This will transform .text* sections to [either,lower,upper].text* sections. The
+argument passed to GCC for -mcode-region is propagated to the linker
+using this option.
+
+@kindex --data-region
+@item --data-region=[either,lower,upper,none]
+This will transform .data*, .bss* and .rodata* sections to
+[either,lower,upper].[data,bss,rodata]* sections. The argument passed to GCC
+for -mdata-region is propagated to the linker using this option.
+
+@kindex --disable-sec-transformation
+@item --disable-sec-transformation
+Prevent the transformation of sections as specified by the @code{--code-region}
+and @code{--data-region} options.
+This is useful if you are compiling and linking using a single call to the GCC
+wrapper, and want to compile the source files using -m[code,data]-region but
+not transform the sections for prebuilt libraries and objects.
+@end table
+
@ifclear GENERIC
@lowersections
@end ifclear
@item --plt-align
@itemx --no-plt-align
Use these options to control whether individual PLT call stubs are
-padded so that they don't cross a 32-byte boundary, or to the
-specified power of two boundary when using @code{--plt-align=}. Note
-that this isn't alignment in the usual sense. By default PLT call
-stubs are packed tightly.
+aligned to a 32-byte boundary, or to the specified power of two
+boundary when using @code{--plt-align=}. A negative value may be
+specified to pad PLT call stubs so that they do not cross the
+specified power of two boundary (or the minimum number of boundaries
+if a PLT stub is so large that it must cross a boundary). By default
+PLT call stubs are aligned to 32-byte boundaries.
@cindex PowerPC64 PLT call stub static chain
@kindex --plt-static-chain
@kindex --plt-thread-safe
@kindex --no-plt-thread-safe
@item --plt-thread-safe
-@itemx --no-thread-safe
+@itemx --no-plt-thread-safe
With power7's weakly ordered memory model, it is possible when using
lazy binding for ld.so to update a plt entry in one thread and have
another thread see the individual plt entry words update in the wrong
looks for calls to commonly used functions that create threads, and if
seen, adds the necessary barriers. Use these options to change the
default behaviour.
+
+@cindex PowerPC64 ELFv2 PLT localentry optimization
+@kindex --plt-localentry
+@kindex --no-plt-localentry
+@item --plt-localentry
+@itemx --no-localentry
+ELFv2 functions with localentry:0 are those with a single entry point,
+ie. global entry == local entry, and that have no requirement on r2
+(the TOC/GOT pointer) or r12, and guarantee r2 is unchanged on return.
+Such an external function can be called via the PLT without saving r2
+or restoring it on return, avoiding a common load-hit-store for small
+functions. The optimization is attractive, with up to 40% reduction
+in execution time for a small function, but can result in symbol
+interposition failures. Also, minor changes in a shared library,
+including system libraries, can cause a function that was localentry:0
+to become localentry:8. This will result in a dynamic loader
+complaint and failure to run. The option is experimental, use with
+care. @option{--no-plt-localentry} is the default.
+@end table
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
+@ifset S/390
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node S/390 ELF
+@section @command{ld} and S/390 ELF Support
+
+@cindex S/390 ELF options
+@table @option
+
+@cindex S/390
+@kindex --s390-pgste
+@item --s390-pgste
+This option marks the result file with a @code{PT_S390_PGSTE}
+segment. The Linux kernel is supposed to allocate 4k page tables for
+binaries marked that way.
@end table
@ifclear GENERIC
@code{PRIVATE}: Put the symbol in the DLL's export table, but do not put
it into the static import library used to resolve imports at link time. The
symbol can still be imported using the @code{LoadLibrary/GetProcAddress}
-API at runtime or by by using the GNU ld extension of linking directly to
+API at runtime or by using the GNU ld extension of linking directly to
the DLL without an import library.
See ld/deffilep.y in the binutils sources for the full specification of
xxx.dll.a
libxxx.a
xxx.lib
+libxxx.lib
cygxxx.dll (*)
libxxx.dll
xxx.dll
@cindex @code{FORMAT} (MRI)
@item FORMAT @var{output-format}
Similar to the @code{OUTPUT_FORMAT} command in the more general linker
-language, but restricted to one of these output formats:
-
-@enumerate
-@item
-S-records, if @var{output-format} is @samp{S}
-
-@item
-IEEE, if @var{output-format} is @samp{IEEE}
-
-@item
-COFF (the @samp{coff-m68k} variant in BFD), if @var{output-format} is
-@samp{COFF}
-@end enumerate
+language, but restricted to S-records, if @var{output-format} is @samp{S}
@cindex @code{LIST} (MRI)
@item LIST @var{anything}@dots{}