Red Hat ENTERPRISE LINUX 3 - USING ID Using Instructions

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

Advertisement

Red Hat Enterprise Linux 3
Using ld, the Gnu Linker

Advertisement

Table of Contents
loading

Summary of Contents for Red Hat ENTERPRISE LINUX 3 - USING ID

  • Page 1 Red Hat Enterprise Linux 3 Using ld, the Gnu Linker...
  • Page 2 HTML, PDF, and RPM versions of the manuals are available on the Documentation CD and online at http://www.redhat.com/docs/. The GPG fingerprint of the security@redhat.com key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E...
  • Page 3: Table Of Contents

    Table of Contents 1. Using ld ............................1 2. Overview ............................3 3. Invocation ............................5 3.1. Command Line Options..................... 5 3.1.1. Options Specific to i386 PE Targets ..............21 3.2. Environment Variables..................... 27 4. Linker Scripts..........................29 4.1. Basic Linker Script Concepts................... 29 4.2.
  • Page 4 6. BFD..............................67 6.1. How It Works: An Outline of BFD .................. 67 6.1.1. Information Loss....................67 6.1.2. The BFD canonical object-file format .............. 68 7. Reporting Bugs..........................71 7.1. Have You Found a Bug? ....................71 7.2. How to Report Bugs......................71 A.
  • Page 5: Using Ld

    Chapter 1. Using ld This file documents the gnu linker ld version 2.14.90.0.4. This document is distributed under the terms of the GNU Free Documentation License. A copy of the license is included in the section entitled "GNU Free Documentation License".
  • Page 6 Chapter 1. Using ld...
  • Page 7: Overview

    Chapter 2. Overview combines a number of object and archive files, relocates their data and ties up symbol references. Usually the last step in compiling a program is to run accepts Linker Command Language files written in a superset of AT&T’s Link Editor Command Language syntax, to provide explicit and total control over the linking process.
  • Page 8 Chapter 2. Overview...
  • Page 9: Invocation

    Chapter 3. Invocation The gnu linker is meant to cover a broad range of situations, and to be as compatible as possible with other linkers. As a result, you have many choices to control its behavior. 3.1. Command Line Options The linker supports a plethora of command-line options, but in actual practice few of them are used in any particular context.
  • Page 10 Chapter 3. Invocation Note--if the linker is being invoked indirectly, via a compiler driver (e.g. ) then all the linker com- mand line options should be prefixed by (or whatever is appropriate for the particular compiler -Wl, driver) like this: gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup This is important, because otherwise the compiler driver program may silently drop the linker options, resulting in a bad link.
  • Page 11 Chapter 3. Invocation 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 ). The script command has the same effect. Refer to Section FORCE_COMMON_ALLOCATION 4.4.4 Other Linker Script Commands.
  • Page 12 Chapter 3. Invocation name -filter name When creating an ELF shared object, set the internal DT_FILTER field to the specified name. This tells the dynamic linker that the symbol table of the shared object which is being created should be used as a filter on the symbol table of the shared object name If you later link a program against this filter object, then, when you run the program, the dynamic linker will see the DT_FILTER field.
  • Page 13 Chapter 3. Invocation On systems which support shared libraries, may also search for libraries with extensions other than . Specifically, on ELF and SunOS systems, will search a directory for a library with an extension of before searching for one with an extension of .
  • Page 14 Chapter 3. Invocation -nmagic Turn off page alignment of sections, and mark the output as if possible. NMAGIC -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 OMAGIC -no-omagic...
  • Page 15 Chapter 3. Invocation filename -just-symbols= filename Read symbol names and their addresses from , but do not relocate it or include it in filename the output. This allows your output file to refer symbolically to absolute locations of memory defined in other programs. You may use this option more than once. For compatibility with other ELF linkers, if the option is followed by a directory name, rather than a file name, it is treated as the...
  • Page 16 Chapter 3. Invocation -version Display the version number for . The option also lists the supported emulations. -discard-all Delete all local symbols. -discard-locals Delete all temporary local symbols. For most targets, this is all local symbols whose names begin with symbol -trace-symbol= symbol...
  • Page 17 Chapter 3. Invocation Using this option has a significant performance cost. It is best to use it only when there are unavoidable circular references between two or more archives. -accept-unknown-input-arch -no-accept-unknown-input-arch Tells the linker to accept input files whose architecture cannot be recognised. The assumption is that the user knows what they are doing and deliberately wants to link in these unknown input files.
  • Page 18 Chapter 3. Invocation -cref Output a cross reference table. If a linker map file is being generated, the cross reference table is printed to the map file. Otherwise, it is printed on the standard output. The format of the table is intentionally simple, so that it may be easily processed by a script if necessary.
  • Page 19 Chapter 3. Invocation -fatal-warnings Treat all warnings as errors. -force-exe-suffix Make sure that an output file has a .exe suffix. If a successfully built fully linked output file does not have a suffix, this option .exe .dll forces the linker to copy the output file to one of the same name with a suffix.
  • Page 20 Chapter 3. Invocation set but is not, the net result will be that undefined symbols in -no-allow-shlib-undefined regular object files will trigger an error, but undefined symbols in shared objects will be ignored. The reason that is the default is that the shared object being spec- -allow-shlib-undefined ified at link time may not be the same one that is available at load time, so the symbols might actually be resolvable at load time.
  • Page 21 Chapter 3. Invocation -qmagic This option is ignored for Linux compatibility. This option is ignored for SVR4 compatibility. -relax An option with machine dependent effects. This option is only supported on a few targets. Refer to Section 5.1 and the H8/300, Section 5.2 and the Intel 960 Family and Section 5.9 and Xtensa Processors.
  • Page 22 Chapter 3. Invocation not included explicitly. In such a case, the option specifies the first set of direc- -rpath-link tories to search. The option may specify a sequence of directory names either by -rpath-link specifying a list of names separated by colons, or by appearing multiple times. This option should be used with caution as it overrides the search path that may have been hard compiled into a shared library.
  • Page 23 Chapter 3. Invocation input sections for redistribution, so if a single input section contains more than relocations count one output section will contain that many relocations. defaults to a value of 32768. count -stats Compute and display statistics about the operation of the linker, such as execution time and memory usage.
  • Page 24 Chapter 3. Invocation extern int i; An undefined reference, which does not allocate space. There must be either a definition or a common symbol for the variable somewhere. int i; A common symbol. If there are only (one or more) common symbols for a variable, it goes in the uninitialized data area of the output file.
  • Page 25: Options Specific To I386 Pe Targets

    Chapter 3. Invocation -warn-once Only warn once for each undefined symbol, rather than once per module which refers to it. -warn-section-align Warn if the address of an output section is changed because of alignment. Typically, the alignment will be set by an input section. The address will only be changed if it not explicitly specified; that is, if the command does not specify a start address for the section (refer to Section SECTIONS...
  • Page 26 Chapter 3. Invocation option. In addition, the linker fully supports the standard files, which may be specified on the *.def linker command line like an object file (in fact, it should precede archives it exports symbols from, to ensure that they get linked in, just like a normal object file). In addition to the options common to all targets, the i386 PE linker support additional command line options that are specific to the i386 PE target.
  • Page 27 Chapter 3. Invocation -exclude-symbols ,... symbol symbol Specifies a list of symbols which should not be automatically exported. The symbol names may be delimited by commas or colons. [This option is specific to the i386 PE targeted port of the linker] -exclude-libs ,...
  • Page 28 Chapter 3. Invocation -minor-image-version value Sets the minor number of the "image version". Defaults to 0. [This option is specific to the i386 PE targeted port of the linker] -minor-os-version value Sets the minor number of the "os version". Defaults to 0. [This option is specific to the i386 PE targeted port of the linker] -minor-subsystem-version value...
  • Page 29 Chapter 3. Invocation This message occurs when some (sub)expression accesses an address ultimately given by the sum of two constants (Win32 import tables only allow one). Instances where this may occur include accesses to member fields of struct variables imported from a DLL, as well as using a constant index into an array variable imported from a DLL.
  • Page 30 Chapter 3. Invocation Solution 2: --foo.h /* Note: auto-export is assumed (no __declspec(dllexport)) */ #if (defined(_WIN32) || defined(__CYGWIN__)) && \ !(defined(FOO_BUILD_DLL) || defined(FOO_STATIC)) #define FOO_IMPORT __declspec(dllimport) #else #define FOO_IMPORT #endif extern FOO_IMPORT int arr[]; --foo.c #include "foo.h" void main(int argc, char **argv){ printf("%d\n",arr[1]);...
  • Page 31: Environment Variables

    Chapter 3. Invocation -subsystem which -subsystem which major -subsystem which major minor Specifies the subsystem under which your program will execute. The legal values for which , and . You may optionally set the subsystem version also. native windows console posix [This option is specific to the i386 PE targeted port of the linker] 3.2.
  • Page 32 Chapter 3. Invocation...
  • Page 33: Linker Scripts

    Chapter 4. Linker Scripts Every link is controlled by a linker script. This script is written in the linker command language. The main purpose of the linker script is to describe how the sections in the input files should be mapped into the output file, and to control the memory layout of the output file.
  • Page 34: Simple Linker Script Example

    Chapter 4. Linker Scripts 4.2. Linker Script Format Linker scripts are text files. You write a linker script as a series of commands. Each command is either a keyword, possibly followed by arguments, or an assignment to a symbol. You may separate commands using semicolons. Whitespace is generally ignored.
  • Page 35: Simple Linker Script Commands

    Chapter 4. Linker Scripts The linker will ensure that each output section has the required alignment, by increasing the location counter if necessary. In this example, the specified addresses for the sections will .text .data probably satisfy any alignment constraints, but the linker may have to create a small gap between the sections.
  • Page 36: Commands Dealing With Object File Formats

    Chapter 4. Linker Scripts If you use will transform the name to , as with the command INPUT (-l file file line argument When you use the command in an implicit linker script, the files will be included in the INPUT link at the point at which the linker script file is included.
  • Page 37: Other Linker Script Commands

    Chapter 4. Linker Scripts TARGET( bfdname command names the BFD format to use when reading input files. It affects sub- TARGET sequent commands. This command is like using on the com- INPUT GROUP bfdname mand line (refer to Section 3.1 Command Line Options). If the command is used but TARGET is not, then the last...
  • Page 38: Simple Assignments

    Chapter 4. Linker Scripts 4.5.1. Simple Assignments You may assign to a symbol using any of the C assignment operators: • symbol expression • symbol expression • symbol expression • symbol expression • symbol expression • symbol expression ¥ ¦ ¥ •...
  • Page 39: Sections Command

    Chapter 4. Linker Scripts SECTIONS .text : *(.text) _etext = .; PROVIDE(etext = .); In this example, if the program defines (with a leading underscore), the linker will give a mul- _etext tiple definition error. If, on the other hand, the program defines (with no leading underscore), etext the linker will silently use the definition in the program.
  • Page 40: Output Section Name

    Chapter 4. Linker Scripts ] [AT ] [: ...] [= region lma_region phdr phdr fillexp ¨ ¨ Most output sections do not use most of the optional section attributes. The whitespace around is required, so that the section name is unambiguous. The colon and section the curly braces are also required.
  • Page 41: Input Section Description

    Chapter 4. Linker Scripts This works because returns the current location counter aligned upward to the specified value. ALIGN Specifying for a section will change the value of the location counter. address 4.6.4. Input Section Description The most common output section command is an input section description. The input section description is the most basic linker script operation.
  • Page 42 Chapter 4. Linker Scripts 4.6.4.2. Input Section Wildcard Patterns In an input section description, either the file name or the section name or both may be wildcard patterns. The file name of seen in many examples is a simple wildcard pattern for the file name. The wildcard patterns are like those used by the Unix shell.
  • Page 43: Output Section Data

    Chapter 4. Linker Scripts 4.6.4.3. Input Section for Common Symbols A special notation is needed for common symbols, because in many object file formats common symbols do not have a particular input section. The linker treats common symbols as though they are in an input section named COMMON You may use file names with the...
  • Page 44: Output Section Keywords

    Chapter 4. Linker Scripts 4.6.5. Output Section Data You can include explicit bytes of data in an output section by using , or BYTE SHORT LONG QUAD as an output section command. Each keyword is followed by an expression in parentheses SQUAD providing the value to store (refer to Section 4.10 Expressions in Linker Scripts).
  • Page 45: Output Section Discarding

    Chapter 4. Linker Scripts This is conventional for the a.out object file format. It is not normally used for any other object file format. CONSTRUCTORS When linking using the a.out object file format, the linker uses an unusual set construct to support C++ global constructors and destructors.
  • Page 46: Output Section Attributes

    Chapter 4. Linker Scripts 4.6.8. Output Section Attributes We showed above that the full description of an output section looked like this: ] [( )] : [AT( section address type output-section-command output-section-command ] [AT ] [: ...] [= region lma_region phdr phdr fillexp...
  • Page 47 Chapter 4. Linker Scripts SECTIONS .text 0x1000 : { *(.text) _etext = . ; } .mdata 0x2000 : AT ( ADDR (.text) + SIZEOF (.text) ) { _data = . ; *(.data); _edata = . ; .bss 0x3000 : { _bstart = . ; *(.bss) *(COMMON) ;...
  • Page 48: Overlay Description

    Chapter 4. Linker Scripts be used to specify the fill pattern; Leading zeros become part of the pattern too. For all other cases, including extra parentheses or a unary , the fill pattern is the four least significant bytes of the value of the expression.
  • Page 49: Memory Command

    Chapter 4. Linker Scripts At the end of the overlay, the value of the location counter is set to the start address of the overlay plus the size of the largest section. Here is an example. Remember that this would appear inside a construct.
  • Page 50 Chapter 4. Linker Scripts SECTIONS Command, if you do not specify an output section for some input section, the linker will create an output section with the same name as the input section. If you define region attributes, the linker will use them to select the memory region for the output section that it creates. string must consist only of the following characters: attr Read-only section...
  • Page 51: Phdrs Command

    Chapter 4. Linker Scripts to the next available address within the memory region. If the combined output sections directed to a memory region are too large for the region, the linker will issue an error message. 4.8. PHDRS Command The ELF object file format uses program headers, also knows as segments. The program headers de- scribe how the program should be loaded into memory.
  • Page 52 Chapter 4. Linker Scripts PT_LOAD Indicates that this program header describes a segment to be loaded from the file. PT_DYNAMIC Indicates a segment where dynamic linking information can be found. PT_INTERP Indicates a segment where the name of the program interpreter may be found. PT_NOTE Indicates a segment holding note information.
  • Page 53: Version Command

    Chapter 4. Linker Scripts 4.9. VERSION Command The linker supports symbol versions when using ELF. Symbol versions are only useful when using shared libraries. The dynamic linker can use symbol versions to select a specific version of a function when it runs a program that may have been linked against an earlier version of the shared library. You can include a version script directly in the main linker script, or you can supply the version script as an implicit linker script.
  • Page 54 Chapter 4. Linker Scripts Node name can be omited, provided it is the only version node in the version script. Such version script doesn’t assign any versions to symbols, only selects which symbols will be globally visible out and which won’t. { global: foo;...
  • Page 55: Expressions In Linker Scripts

    Chapter 4. Linker Scripts If you wish to bind a reference to a specific version of the symbol within the shared library, you can use the aliases of convenience (i.e., ), or you can use the directive to specifically old_foo .symver bind to an external version of the function in question.
  • Page 56: The Location Counter

    Chapter 4. Linker Scripts 4.10.3. The Location Counter The special linker variable dot always contains the current output location counter. Since the always refers to a location in an output section, it may only appear in an expression within a SECTIONS command.
  • Page 57: Operators

    Chapter 4. Linker Scripts 4.10.4. Operators The linker recognizes the standard C set of arithmetic operators, with the standard bindings and prece- dence levels: precedence associativity Operators Notes (highest) left left left left        left      left...
  • Page 58: The Section Of An Expression

    Chapter 4. Linker Scripts 4.10.6. The Section of an Expression When the linker evaluates an expression, the result is either absolute or relative to some section. A relative expression is expressed as a fixed offset from the base of a section. The position of the expression within the linker script determines whether it is absolute or relative.
  • Page 59 Chapter 4. Linker Scripts ALIGN( Return the location counter ( ) aligned to the next boundary. doesn’t change the ALIGN value of the location counter--it just does arithmetic on it. Here is an example which aligns the output section to the next byte boundary after the preceding section and sets a .data 0x2000...
  • Page 60: Implicit Linker Scripts

    Chapter 4. Linker Scripts LOADADDR( section Return the absolute LMA of the named . This is normally the same as , but it may section ADDR be different if the attribute is used in the output section definition (refer to Section 4.6.8.2 Output Section LMA).
  • Page 61 Chapter 4. Linker Scripts Typically an implicit linker script would contain only symbol assignments, or the , or INPUT GROUP commands. VERSION Any input files read because of an implicit linker script will be read at the position in the command line where the implicit linker script was read.
  • Page 62 Chapter 4. Linker Scripts...
  • Page 63: Machine Dependent Features

    Chapter 5. Machine Dependent Features has additional features on some platforms; the following sections describe them. Machines where has no additional functionality are not listed. 5.1. and the H8/300 For the H8/300, can perform these global optimizations when you specify the command- -relax line option.
  • Page 64: Support For Interworking Between Arm And Thumb Code

    Chapter 5. Machine Dependent Features 5.3. ’s Support for Interworking Between ARM and Thumb Code For the ARM, will generate code stubs to allow functions calls betweem ARM and Thumb code. These stubs only work with code that has been compiled and assembled with the command line option.
  • Page 65: Support For Various Ti Coff Versions

    Chapter 5. Machine Dependent Features The linker will recognize some extra sections which are MSP430 specific: .vectors Defines a portion of ROM where interrupt vectors located. .bootloader Defines the bootloader portion of the ROM (if applicable). Any code in this section will be uploaded to the MPU.
  • Page 66 Chapter 5. Machine Dependent Features -exclude-libs • If, however, is not given explicitly on the command line, then the -export-all-symbols default auto-export behavior will be disabled if either of the following are true: A DEF file is used. • Any symbol in any object file was marked with the __declspec(dllexport) attribute. •...
  • Page 67 Chapter 5. Machine Dependent Features was initially provided by Paul Sokolovsky, allows one to omit the decorations to archieve a behavior that conforms to that on POSIX/Un*x platforms. This feature is enabled with command-line option, although it is enabled by default on -enable-auto-import cygwin/mingw.
  • Page 68 Chapter 5. Machine Dependent Features Other win32-based unix environments, such as mingw or pw32, may use other prefix although at present only cygwin makes use of this feature. It was originally intended to help avoid name conflicts among dll’s built for the various win32/un*x environments, so that (for example) two versions of a zlib dll could coexist on the same machine.
  • Page 69: And Xtensa Processors

    Chapter 5. Machine Dependent Features file when creating the dll. This will affect also the optional created import library. Consider the following DEF file: LIBRARY "xyz.dll" BASE=0x61000000 EXPORTS _foo = foo The line maps the symbol _foo = foo _foo Another method for creating a symbol alias is to create it in the source code using the "weak"...
  • Page 70 Chapter 5. Machine Dependent Features .text : { *(.literal) *(.text) The Xtensa version of enables the option by default to attempt to reduce space in the -relax output image by combining literals with identical values. It also provides the option to -no-relax disable this optimization.
  • Page 71: Bfd

    Chapter 6. The linker accesses object and archive files using the BFD libraries. These libraries allow the linker to use the same routines to operate on object files whatever the object file format. A different object file format can be supported simply by creating a new BFD back end and adding it to the library. To conserve runtime memory, however, the linker and associated tools are usually configured to support only a subset of the object file formats available.
  • Page 72: The Bfd Canonical Object-File Format

    Chapter 6. BFD This limitation is only a problem when an application reads one format and writes another. Each BFD back end is responsible for maintaining as much data as possible, and the internal BFD canonical form has structures which are opaque to the BFD core, and exported only to the back ends. When a file is read in one format, the canonical form is generated for BFD and the application.
  • Page 73 Chapter 6. BFD that is only available in one of the input formats. For instance, Oasys provides a byte relocation format. A relocation record requesting this relocation type would point indirectly to a routine to perform this, so the relocation may be performed on a byte being written to a 68k COFF file, even though 68k COFF has no such relocation type.
  • Page 74 Chapter 6. BFD...
  • Page 75: Reporting Bugs

    Chapter 7. Reporting Bugs Your bug reports play an essential role in making reliable. Reporting a bug may help you by bringing a solution to your problem, or it may not. But in any case the principal function of a bug report is to help the entire community by making the next version of work better.
  • Page 76 Chapter 7. Reporting Bugs Without this, we will not know whether there is any point in looking for the bug in the current version of Any patches you may have applied to the source, including any patches made to the library.
  • Page 77 Chapter 7. Reporting Bugs A patch for the bug. • A patch for the bug does help us if it is a good one. But do not omit the necessary information, such as the test case, on the assumption that a patch is all we need. We might see problems with your patch and decide to fix the problem another way, or we might not understand it at all.
  • Page 78 Chapter 7. Reporting Bugs...
  • Page 79 Appendix A. MRI Compatible Script Files To aid users making the transition to gnu from the MRI linker, can use MRI compatible linker scripts as an alternative to the more general-purpose linker scripting language described in Chapter 4 Linker Scripts. MRI compatible linker scripts have a much simpler command set than the scripting language otherwise used with .
  • Page 80: A. Mri Compatible Script Files

    Appendix A. MRI Compatible Script Files This command does nothing whatever; it’s only accepted for compatibility. FORMAT output-format Similar to the command in the more general linker language, but restricted to OUTPUT_FORMAT one of these output formats: 1. S-records, if output-format 2.
  • Page 81: Gnu Free Documentation License

    Appendix B. GNU Free Documentation License Version 1.1, March 2000 Copyright (C) 2000, Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 1.
  • Page 82 Appendix B. GNU Free Documentation License edited directly and straightforwardly with generic text editors or (for images composed of pix- els) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suit- able for input to text formatters.
  • Page 83 Appendix B. GNU Free Documentation License You may copy and distribute a Modified Version of the Document under the conditions of sec- tions 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and mod- ification of the Modified Version to whoever possesses a copy of it.
  • Page 84 Appendix B. GNU Free Documentation License nation all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy.
  • Page 85: Addendum: How To Use This License For Your Documents

    Appendix B. GNU Free Documentation License Each version of the License is given a distinguishing version number. If the Document speci- fies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation.
  • Page 86 Appendix B. GNU Free Documentation License...
  • Page 87: Index

    Index -dn, see Section 3.1 Command Line Options -dp, see Section 3.1 Command Line Options -dy, see Section 3.1 Command Line Options -dynamic-linker , see Section 3.1 Command Line file ", see Section 4.10.2 Symbol Names Options -(, see Section 3.1 Command Line Options -E, see Section 3.1 Command Line Options , see Section 3.1 Command Line Options arch...
  • Page 88 Index -image-base, see Section 3.1 Command Line Options -no-whole-archive, see Section 3.1 Command Line -init, see Section 3.1 Command Line Options Options -just-symbols= , see Section 3.1 Command Line -noinhibit-exec, see Section 3.1 Command Line Op- file Options tions -kill-at, see Section 3.1 Command Line Options -non_shared, see Section 3.1 Command Line Options , see Section 3.1 Command Line Options -nostdlib, see Section 3.1 Command Line Options...
  • Page 89 Index -support-old-code, see Section 5.3 ’s Support for Interworking Between ARM and Thumb Code -t, see Section 3.1 Command Line Options absolute and relocatable symbols, see Section 4.10.6 , see Section 3.1 Command Line Options The Section of an Expression script -target-help, see Section 3.1 Command Line Options absolute expressions, see Section 4.10.6 The Section...
  • Page 90 Index cross references, see Section 4.4.4 Other Linker Script Commands back end, see Chapter 6 BFD current output location, see Section 4.10.3 The Loca- (MRI), see Appendix A MRI Compatible Script BASE tion Counter Files BFD canonical format, see Section 6.1.2 The BFD canonical object-file format BFD requirements, see Chapter 6 BFD big-endian objects, see Section 3.1 Command Line...
  • Page 91 Index functions in expressions, see Section 4.10.7 Builtin Functions ELF program headers, see Section 4.8 PHDRS Com- mand emulation, see Section 3.1 Command Line Options emulation, default, see Section 3.2 Environment Vari- ables garbage collection, see Section 4.6.4.4 Input Section (MRI), see Appendix A MRI Compatible Script and Garbage Collection Files...
  • Page 92 Index initialization function, see Section 3.1 Command Line linker script example, see Section 4.3 Simple Linker Options Script Example initialized data in ROM, see Section 4.6.8.2 Output linker script file commands, see Section 4.4.2 Com- Section LMA mands Dealing with Files input file format in linker script, see Section 4.4.3 linker script format, see Section 4.2 Linker Script For- Commands Dealing with Object File Formats...
  • Page 93 Index (MRI), see Appendix A MRI Compatible Script NAME Files partial link, see Section 3.1 Command Line Options PHDRS, see Section 4.8 PHDRS Command position independent executables, see Section 3.1 Command Line Options precedence in expressions, see Section 4.10.4 Opera- name, section, see Section 4.6.2 Output Section Name tors names, see Section 4.10.2 Symbol Names...
  • Page 94 Index retaining specified symbols, see Section 3.1 Com- shared libraries, see Section 3.1 Command Line Op- mand Line Options tions ROM initialized data, see Section 4.6.8.2 Output Sec- SHORT( ), see Section 4.6.5 Output Sec- expression tion LMA tion Data round up location counter, see Section 4.10.7 Builtin SIZEOF( ), see Section 4.10.7 Builtin Func-...
  • Page 95 Index what is this?, see Chapter 2 Overview wildcard file name patterns, see Section 4.6.4.2 Input TARGET( ), see Section 4.4.3 Commands bfdname Section Wildcard Patterns Dealing with Object File Formats thumb entry point, see Section 5.3 ’s Support for Interworking Between ARM and Thumb Code TI COFF versions, see Section 5.7 ’s Support for...

This manual is also suitable for:

Enterprise linux 3

Table of Contents