Lines Matching refs:an
231 execution immediately upon encountering an error; whenever possible,
233 (or, in some cases, to get an output file in spite of the error).
292 options, except that an object file argument may not be placed between
293 an option and its argument.
301 If the linker cannot recognize the format of an object file, it will
305 permits the linker to link against a file which appears to be an object
306 or an archive, but actually merely defines some symbol values, or uses
328 option name by an equals sign, or be given as separate arguments
375 finds an object with an audit entry while searching for shared libraries,
417 You may want to use this option if you are linking files with an unusual
441 files written in an alternate, restricted command language, described in
562 When creating an ELF shared object, set the internal DT_AUXILIARY field
564 table of the shared object should be used as an auxiliary filter on the
573 Thus the shared object @var{name} may be used to provide an alternative
584 When creating an ELF shared object, set the internal DT_FILTER field to
607 creating an ELF shared object.
612 When creating an ELF executable or shared object, call NAME when the
636 When creating an ELF shared object, set the internal DT_SONAME field to
637 the specified name. When an executable is linked with a shared object
645 Perform an incremental link (same as option @samp{-r}).
650 When creating an ELF executable or shared object, call NAME when the
675 The linker will search an archive only once, at the location where it is
679 archive. However, an undefined symbol in an object appearing later on
753 Note - symbols whose values are computed by an expression which
757 of an expression. Under such circumstances the linker will display
883 Generate relocatable output---i.e., generate an output file that can in
889 If this option is not specified, an absolute file is produced. When
893 When an input file does not have the same format as the output file,
970 Force @var{symbol} to be entered in the output file as an undefined
980 @samp{-r}: it generates relocatable output---i.e., an output file that can in
1031 to prepend an underscore.
1033 This option is useful when you have an undefined symbol in your link but
1075 When generating an executable or shared library, mark it to tell the
1110 Don't create an ELF @code{PT_GNU_RELRO} segment header in the object.
1113 When generating an executable or shared library, mark it to tell the
1123 Create an ELF @code{PT_GNU_RELRO} segment header in the object.
1132 Specify a stack size for in an ELF @code{PT_GNU_STACK} segment.
1148 references are created. Normally, an archive is searched only once in
1150 archive is needed to resolve an undefined symbol referred to by an
1151 object in an archive that appears later on the command line, the linker
1305 output binary for each library mentioned in a DT_NEEDED tag in an
1311 This option also has an effect on the resolution of symbols in dynamic
1360 context: you may give a hexadecimal constant or the name of an existing
1379 to choose an appropriate demangling style for your compiler. The linker will
1402 Make sure that an output file has a .exe suffix.
1408 Windows host, since some versions of Windows won't run an image unless
1433 specified either by an @samp{--entry} or @samp{--undefined} option or by
1453 in an @code{OUTPUT_FORMAT} linker script command (@pxref{File Commands}).
1509 an executable, but to allow them if the linker is being used to create
1526 architecture. This is used, for example, to dynamically select an
1532 Normally when a symbol has an undefined version, the linker will ignore
1548 Normally @command{ld} will give an error if you try to link together input
1558 Normally @command{ld} will give a warning if it finds an incompatible
1570 Normally, the linker will not produce an output file if it encounters
1571 errors during the link process; it exits without writing an output file
1691 linking an ELF executable with shared objects. All @option{-rpath}
1696 @option{-rpath-link} option. If @option{-rpath} is not used when linking an
1718 happens when an @code{ld -shared} link includes a shared library as one
1749 On an ELF system, for native linkers, if the @option{-rpath} and
1766 For a native linker on an ELF system, if the file @file{/etc/ld.so.conf}
1844 symbol string table. This can reduce the size of an output file with
1875 When creating an ELF executable, it will set the address of the first
1881 When creating an ELF executable or shared object for a target where
1888 When creating an ELF executable or shared object for x86-64 medium memory
1918 Normally the linker will generate an error message for each reported
2059 Warn if the address of an output section is changed because of
2060 alignment. Typically, the alignment will be set by an input section.
2071 Warn if an object has alternate ELF machine code.
2075 If the linker is going to report an unresolved symbol (see the option
2076 @option{--unresolved-symbols}) it will normally generate an error.
2085 @cindex including an entire archive
2090 files. This is normally used to turn an archive file into a shared
2199 string specified as an even number of hexadecimal digits (@code{-} and
2203 The @code{md5} and @code{sha1} styles produces an identifier
2204 that is always the same in an identical output file, but will be
2228 Give an error instead of a warning for @option{-L} options using
2243 like an object file (in fact, it should precede archives it exports
2250 values by either a space or an equals sign.
2265 [This is an i386 PE specific option]
2278 The PE variants of the Coff object format add an extension that permits
2289 information sections in an executable image at runtime, and so if neither
2292 when it finds the presence of debug information while linking an executable
2319 For most targets default symbol-prefix is an underscore and is defined
2340 not be exported, to help with C++ DLLs. Finally, there is an
2447 (which should be called @code{*.def}) may be used to create an import
2455 The linker will create the file @var{file} which will contain an
2483 When linking dynamically to a dll without an import library,
2512 This message occurs when some (sub)expression accesses an address
2516 constant index into an array variable imported from a DLL. Any
2740 all executables use an index of 0.
2866 of the BFD names for an input format (@pxref{BFD}). If there is no
2951 file and each input file are in a special data format known as an
2952 @dfn{object file format}. Each file is called an @dfn{object file}.
2953 The output file is often called an @dfn{executable}, but for our
2954 purposes we will also call it an object file. Each object file has,
2956 section in an input file as an @dfn{input section}; similarly, a section
2957 in the output file is an @dfn{output section}.
2959 Each section in an object file has a name and a size. Most sections
2960 also have an associated block of data, known as the @dfn{section
2963 A section with no contents may be @dfn{allocatable}, which means that an
2980 You can see the sections in an object file by using the @code{objdump}
2985 has a name, and each defined symbol has an address, among other
2986 information. If you compile a C or C++ program into an object file, you
2989 referenced in the input file will become an undefined symbol.
2991 You can see the symbols in an object file by using the @code{nm}
3001 either a keyword, possibly followed by arguments, or an assignment to a
3052 counter. If you do not specify the address of an output section in some
3058 The second line defines an output section, @samp{.text}. The colon is
3180 When you use the @code{INPUT} command in an implicit linker script, the
3300 The @code{REGION_ALIAS} function creates an alias name @var{alias} for the
3304 Suppose we have an application for embedded systems which come with various
3452 with an error code, and print @var{message}.
3457 Force @var{symbol} to be entered in the output file as an undefined
3492 is an example of how a @samp{-T} script using @code{INSERT} might look:
3509 This command may be used to tell @command{ld} to issue an error about any
3515 errors. For example, it would be an error if code in one section called
3520 an error and returns a non-zero exit status. Note that the
3531 architecture of an object file by using the @code{objdump} program with
3588 statements within a @code{SECTIONS} command, or as part of an output
3594 Here is an example showing the three different places that symbol
3649 @samp{etext} as a function name without encountering an error. The
3654 Here is an example of using @code{PROVIDE} to define @samp{etext}:
3691 prepend or append an underscore, and C++ performs extensive @samp{name
3713 second is that the compiler creates an entry in the program's symbol
3722 creates an entry called @samp{foo} in the symbol table. This entry
3723 holds the address of an @samp{int} sized block of memory where the
3747 Linker scripts symbol declarations, by contrast, create an entry in
3749 an address without a value. So for example the linker script definition:
3755 creates an entry in the symbol table called @samp{foo} which holds
3807 an @code{ENTRY} command (@pxref{Entry Point,,Entry command})
3811 an output section description
3813 an overlay description
3826 linker will place each input section into an identically named output
3846 The full description of an output section looks like this:
3876 an input section description (@pxref{Input Section})
3905 The @var{address} is an expression for the VMA (the virtual memory
3919 If an output memory @var{region} is set for the section then it
3956 The @var{address} may be an arbitrary expression; @ref{Expressions}.
3975 The most common output section command is an input section description.
4037 of an input section, INPUT_SECTION_FLAGS may be used.
4066 matches file but not one in an archive
4073 within an archive called @samp{c}. @samp{archive:file} filespecs may
4074 also be used within an @code{EXCLUDE_FILE} list, but may not appear in
4076 from an archive by using @samp{archive:file} in an @code{INPUT}
4086 When you use a file name which is not an @samp{archive:file} specifier
4089 name on the linker command line or in an @code{INPUT} command. If you
4090 did not, the linker will attempt to open the file as an input file, as
4091 though it appeared on the command line. Note that this differs from an
4101 In an input section description, either the file name or the section
4124 Unix). A pattern consisting of a single @samp{*} character is an
4130 specified on the command line or in an @code{INPUT} command. The linker
4165 @code{SORT} is an alias for @code{SORT_BY_NAME}.
4223 with an upper case character in @samp{.DATA}; for all other files, the
4242 linker treats common symbols as though they are in an input section
4278 This is accomplished by surrounding an input section's wildcard entry
4330 You can include explicit bytes of data in an output section by using
4332 an output section command. Each keyword is followed by an expression in
4350 same; they both store an 8 byte, or 64 bit, value. When both host and
4351 target are 32 bits, an expression is computed as 32 bits. In this case
4355 If the object file format of the output file has an explicit endianness,
4357 When the object file format does not have an explicit endianness, as is
4362 between them, so the following will produce an error from the linker:
4375 current section. It is followed by an expression in parentheses. Any
4382 different parts of an output section.
4419 When linking using the a.out object file format, the linker uses an
4493 space in an output section will also create the output section. So
4497 @samp{sym} is an absolute symbol of value 0 defined in the script.
4498 This allows you to force output of an empty section with @samp{. = .}.
4508 input sections. Any input sections which are assigned to an output
4514 We showed above that the full description of an output section looked
4569 The linker normally sets the attributes of an output section based on
4595 The @code{AT} keyword takes an expression as an argument. This
4597 takes the name of a memory region as an argument. @xref{MEMORY}. The
4601 If neither @code{AT} nor @code{AT>} is specified for an allocatable
4681 You can increase an output section's alignment by using ALIGN. As an
4690 You can force input section alignment within an output section by using
4699 You can specify that an output section should only be created if all
4728 assigned to those segments as well, unless they use an explicitly
4745 You can set the fill pattern for an entire section by using
4746 @samp{=@var{fillexp}}. @var{fillexp} is an expression
4752 an arbitrarily long sequence of hex digits can be used to specify the
4772 An overlay description provides an easy way to describe sections which
4781 @code{OVERLAY} command is used within a @code{SECTIONS} command, like an
4810 sections within an @code{OVERLAY}.
4823 references among the sections, the linker will report an error. Since
4839 Here is an example. Remember that this would appear inside a
4925 The @var{attr} string is an optional list of attributes that specify
4926 whether to use a particular memory region for an input section which is
4928 @ref{SECTIONS}, if you do not specify an output section for some input
4929 section, the linker will create an output section with the same name as
4953 attribute reverses this test, so that an unmapped section will be placed
4960 The @var{origin} is an numerical expression for the start address of
4969 The @var{len} is an expression for the size in bytes of the memory
5001 region, the linker will issue an error message.
5003 It is possible to access the origin and length of a memory in an
5025 When you run an ELF program on a native ELF system, the system loader
5038 generating an ELF output file. In other cases, the linker will simply
5096 Indicates an unused program header.
5125 in memory by using an @code{AT} expression. This is identical to the
5126 @code{AT} command used as an output section attribute (@pxref{Output
5133 an integer. It is used to set the @code{p_flags} field of the program
5136 Here is an example of @code{PHDRS}. This shows a typical set of program
5174 a program that may have been linked against an earlier version of the
5178 you can supply the version script as an implicit linker script. You can
5240 specifically bound to a version node, it will effectively bind it to an
5246 set exported for an old version. That's wrong since older versions
5263 When you link an application against a shared library that has versioned
5277 functions are bound on an as-needed basis, and are not all bound when
5294 be an alias for @samp{foo} bound to the version node @samp{VERS_1.1}.
5301 an incompatible change to an interface without increasing the major
5306 source file. Here is an example:
5330 specifically bind to an external version of the function in question.
5376 * Expression Section:: The Section of an Expression
5386 As in C, the linker considers an integer beginning with @samp{0} to be
5387 octal, and an integer beginning with @samp{0x} or @samp{0X} to be
5467 whereas @samp{A - B} is an expression involving subtraction.
5485 If an orphaned section's name is representable as a C identifier then
5501 location in an output section, it may only appear in an expression
5503 anywhere that an ordinary symbol is allowed in an expression.
5508 location counter may not be moved backwards inside an output section,
5509 and may not be moved backwards outside of an output section if so
5536 statement, whose start address is 0, hence @code{.} can be used as an
5539 not an absolute address. Thus in a script like this:
5560 much data, an error will be produced because this would be an attempt to
5562 and it will have an extra 0x600 bytes worth of space after the end of
5567 Setting symbols to the value of the location counter outside of an
5592 special case of an assignment to @code{.}. I.e., the linker will
5613 assumes that an assignment to @code{.} is setting the start address of
5709 an expression when absolutely necessary.
5728 If the result of an expression is required, but the value is not
5729 available, then an error results. For example, a script like the
5745 @subsection The Section of an Expression
5755 value of a section relative symbol. On the other hand, an absolute
5760 section relative symbols and for builtin functions that return an
5767 versions of @code{ld}. Expressions appearing outside an output
5769 Expressions appearing inside an output section definition treat
5803 Unary operations on an absolute address or number, and binary
5812 in the same section, or between a relative address and an absolute
5813 address, first convert any non-absolute term to an absolute address
5834 conversions) is an absolute address.
5837 You can use the builtin function @code{ABSOLUTE} to force an expression
5839 create an absolute symbol set to the address of the end of the output
5851 Using @code{LOADADDR} also forces an expression absolute, since this
5852 particular builtin function returns an absolute address.
5865 of the expression @var{exp}. Primarily useful to assign an absolute
5906 arithmetic on it. The two operand @code{ALIGN} allows an arbitrary
5910 Here is an example which aligns the output @code{.data} section to the
5937 evaluated, the linker will report an error. In the following example,
5954 scripts. It is most often seen when setting the address of an output
6073 Return the base address of the named @var{segment}. If an explicit
6086 evaluated, the linker will report an error. In the following example,
6113 When producing an ELF output file, if the linker script uses the
6117 additional program headers, it will report an error @samp{not enough
6129 an object file or an archive file, it will try to read the file as a
6131 linker will report an error.
6135 Typically an implicit linker script would contain only symbol
6139 Any input files read because of an implicit linker script will be read
6527 The @samp{--fix-arm1176} switch enables a link-time workaround for an erratum
6541 linking of an object file using 32-bit enumeration values with another
6550 linking of an object file using 32-bit @code{wchar_t} values with another
6563 code into a linked ARM ELF executable whenever an attempt is made to
6594 The @samp{--fix-cortex-a8} switch enables a link-time workaround for an erratum in certain Cortex-A…
6742 are left out from an mmo file.
6757 will select an appropriate linker script for selected MPU type. (To get a list of known MPUs
6772 Defines an information memory section (if applicable). Any code in
6856 be reachable if an input section and its associated call trampolines are
6889 section boundaries, so may not themselves be reachable if an input
6922 @code{.plt} must change because the new secure PLT is an initialized
7023 Some PowerPC64 compilers have an option to generate compressed
7125 This option marks an executable as a PIC plugin module.
7131 regions, and redirects such calls to an overlay manager via a stub.
7161 @command{ld} will provide an estimate of maximum stack usage.
7273 an ASCII file containing definitions of symbols which should be
7285 Here is an example of a DEF file for a shared library called @samp{xyz.dll}:
7301 symbols in the export table. The third exported symbol @code{_bar} is an
7303 by "forwarding" to another module and treating it as an alias for
7306 export library is an alias of @samp{foo}, which gets the string name
7307 in export table @samp{foo2}. The @samp{eoo} symbol is an data export
7314 When the .DEF file is used to build an application, rather than a
7324 or they specify an empty string, the internal name is the same as the
7327 The complete specification of an export symbol is:
7336 Declares @samp{<name1>} as an exported symbol from the DLL, or declares
7337 @samp{<name1>} as an exported alias for @samp{<name2>}; or declares
7353 The import lib will export only an indirect reference to @code{foo} as
7369 the DLL without an import library.
7442 object files typically contain a base address for the variable and an
7456 run without error on an older system.
7467 libraries or applications. When @command{ld} creates an import lib, each
7477 perspective is an understanding of this search, in order to force ld to
7478 select the dll instead of an import library.
7558 Linking directly to a dll without using an import lib will work
7572 possible to do this without an import lib.
7574 3. Symbol aliases can only be resolved using an import lib. This is
7651 defined, the weak symbol becomes an alias for some other symbol. There
7658 @item No search; the symbol is an alias. This form is not presently
7661 As a GNU extension, weak symbols that do not specify an alternate symbol
7711 interleaving might place the @code{.literal} sections from an initial
7722 will be changed to reference an identical literal, as long as the
7729 For each of these cases where an indirect call sequence can be optimized
7796 * BFD outline:: How it works: an outline of BFD
7810 Your bug reports play an essential role in making @command{ld} reliable.
7842 If @command{ld} produces an error message for valid input, that is a bug.
7846 If @command{ld} does not produce an error message for invalid input, that
7851 If you are an experienced user of linkers, your suggestions for
7879 assume that the name of a symbol you use in an example does not
8005 construct an example that will make the program follow a certain path
8011 patch should be an improvement, we will not install it. A test case will
8025 linker, @command{ld} can use MRI compatible linker scripts as an
8036 You can specify a file containing an MRI-compatible script using the
8039 Each command in an MRI-compatible script occupies its own line; each
8041 blank lines are also allowed for punctuation). If a line of an
8042 MRI-compatible script begins with an unrecognized keyword, @command{ld}
8056 the input files. However, in an MRI-compatible script, you can use the
8069 @var{in-secname} may be an integer.
8132 order in which they first appear in the input files. In an MRI-compatible