X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ld%2Fld.texi;h=bf474d4c62b04f7d1de3016f6dec8b1f8ca0cfac;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=9f562935bed06d67708e2cd72d276de5ec694f71;hpb=abf874aafe3d717573e4a48bf0e3c6334e666a55;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/ld.texi b/ld/ld.texi index 9f562935be..bf474d4c62 100644 --- a/ld/ld.texi +++ b/ld/ld.texi @@ -31,6 +31,7 @@ @set MSP430 @set NDS32 @set NIOSII +@set PDP11 @set POWERPC @set POWERPC64 @set Renesas @@ -568,6 +569,24 @@ Note that this option is specific to ELF targeted ports. PE targets support a similar function to export all symbols from a DLL or EXE; see the description of @samp{--export-all-symbols} below. +@kindex --export-dynamic-symbol=@var{glob} +@cindex export dynamic symbol +@item --export-dynamic-symbol=@var{glob} +When creating a dynamically linked executable, symbols matching +@var{glob} will be added to the dynamic symbol table. When creating a +shared library, references to symbols matching @var{glob} will not be +bound to the definitions within the shared library. This option is a +no-op when creating a shared library and @samp{-Bsymbolic} or +@samp{--dynamic-list} are not specified. This option is only meaningful +on ELF platforms which support shared libraries. + +@kindex --export-dynamic-symbol-list=@var{file} +@cindex export dynamic symbol list +@item --export-dynamic-symbol-list=@var{file} +Specify a @samp{--export-dynamic-symbol} for each pattern in the file. +The format of the file is the same as the version node without +scope and node name. See @ref{VERSION} for more information. + @ifclear SingleFormat @cindex big-endian objects @cindex endianness @@ -1357,9 +1376,9 @@ Specifying zero will override any default non-zero sized @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}. +Report an error if DT_TEXTREL is set, i.e., if the position-independent +or shared object has dynamic relocations in read-only sections. Don't +report an error if @samp{notext} or @samp{textoff}. @item undefs Do not report unresolved symbol references from regular object files, @@ -1759,7 +1778,10 @@ Print a summary of all target-specific options on the standard output and exit. @kindex -Map=@var{mapfile} @item -Map=@var{mapfile} Print a link map to the file @var{mapfile}. See the description of the -@option{-M} option, above. +@option{-M} option, above. Specifying a directory as @var{mapfile} +causes the linker map to be written into a file inside the directory. +The name of the file is based upon the @var{output} filename with +@code{.map} appended. @cindex memory usage @kindex --no-keep-memory @@ -2403,9 +2425,10 @@ The address will only be changed if it not explicitly specified; that is, if the @code{SECTIONS} command does not specify a start address for the section (@pxref{SECTIONS}). -@kindex --warn-shared-textrel -@item --warn-shared-textrel -Warn if the linker adds a DT_TEXTREL to a shared object. +@kindex --warn-textrel +@item --warn-textrel +Warn if the linker adds DT_TEXTREL to a position-independent executable +or shared object. @kindex --warn-alternate-em @item --warn-alternate-em @@ -3260,7 +3283,7 @@ an error. @kindex --compact-branches @item --compact-branches @kindex --no-compact-branches -@item --compact-branches +@itemx --no-compact-branches These options control the generation of compact instructions by the linker in the PLT entries for MIPS R6. @@ -3269,6 +3292,73 @@ in the PLT entries for MIPS R6. @c man end @end ifset + +@ifset PDP11 +@subsection Options specific to PDP11 targets + +@c man begin OPTIONS + +For the pdp11-aout target, three variants of the output format can be +produced as selected by the following options. The default variant +for pdp11-aout is the @samp{--omagic} option, whereas for other +targets @samp{--nmagic} is the default. The @samp{--imagic} option is +defined only for the pdp11-aout target, while the others are described +here as they apply to the pdp11-aout target. + +@table @gcctabopt + +@kindex -N +@item -N +@kindex --omagic +@itemx --omagic + +Mark the output as @code{OMAGIC} (0407) in the @file{a.out} header to +indicate that the text segment is not to be write-protected and +shared. Since the text and data sections are both readable and +writable, the data section is allocated immediately contiguous after +the text segment. This is the oldest format for PDP11 executable +programs and is the default for @command{ld} on PDP11 Unix systems +from the beginning through 2.11BSD. + +@kindex -n +@item -n +@kindex --nmagic +@itemx --nmagic + +Mark the output as @code{NMAGIC} (0410) in the @file{a.out} header to +indicate that when the output file is executed, the text portion will +be read-only and shareable among all processes executing the same +file. This involves moving the data areas up to the first possible 8K +byte page boundary following the end of the text. This option creates +a @emph{pure executable} format. + +@kindex -z +@item -z +@kindex --imagic +@itemx --imagic + +Mark the output as @code{IMAGIC} (0411) in the @file{a.out} header to +indicate that when the output file is executed, the program text and +data areas will be loaded into separate address spaces using the split +instruction and data space feature of the memory management unit in +larger models of the PDP11. This doubles the address space available +to the program. The text segment is again pure, write-protected, and +shareable. The only difference in the output format between this +option and the others, besides the magic number, is that both the text +and data sections start at location 0. The @samp{-z} option selected +this format in 2.11BSD. This option creates a @emph{separate +executable} format. + +@kindex --no-omagic +@item --no-omagic + +Equivalent to @samp{--nmagic} for pdp11-aout. + +@end table + +@c man end +@end ifset + @ifset UsesEnvVars @node Environment @section Environment Variables @@ -3589,13 +3679,16 @@ script, and then invoke the linker with nothing but a @samp{-T} option. In case a @dfn{sysroot prefix} is configured, and the filename starts with the @samp{/} character, and the script being processed was located inside the @dfn{sysroot prefix}, the filename will be looked -for in the @dfn{sysroot prefix}. Otherwise, the linker will try to -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, or prefixing the filename -path with @code{$SYSROOT}. See also the description of @samp{-L} in -@ref{Options,,Command-line Options}. +for in the @dfn{sysroot prefix}. The @dfn{sysroot prefix} can also be forced by specifying +@code{=} 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 a @dfn{sysroot prefix} is not used then the linker will try to open +the file in the directory containing the linker script. If it is not +found the linker will then search the current directory. If it is still +not found the linker will search through the archive library search +path. 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