Table Of Contents - Red Hat ENTERPRISE LINUX 3 - USING ID Using Instructions

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

Advertisement

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. Linker Script Format........................................................................................................ 29
4.3. Simple Linker Script Example......................................................................................... 30
4.4. Simple Linker Script Commands..................................................................................... 31
4.4.1. Setting the Entry Point ...................................................................................... 31
4.4.2. Commands Dealing with Files.......................................................................... 31
4.4.3. Commands Dealing with Object File Formats.................................................. 32
4.4.4. Other Linker Script Commands ........................................................................ 33
4.5. Assigning Values to Symbols .......................................................................................... 33
4.5.1. Simple Assignments ......................................................................................... 33
4.5.2. PROVIDE.......................................................................................................... 34
4.6. SECTIONS Command..................................................................................................... 35
4.6.1. Output Section Description............................................................................... 35
4.6.2. Output Section Name........................................................................................ 36
4.6.3. Output Section Description............................................................................... 36
4.6.4. Input Section Description ................................................................................. 37
4.6.5. Output Section Data.......................................................................................... 39
4.6.6. Output Section Keywords ................................................................................. 40
4.6.7. Output Section Discarding................................................................................ 41
4.6.8. Output Section Attributes ................................................................................. 42
4.6.9. Overlay Description .......................................................................................... 44
4.7. MEMORY Command ...................................................................................................... 45
4.8. PHDRS Command ........................................................................................................... 47
4.9. VERSION Command....................................................................................................... 49
4.10. Expressions in Linker Scripts ........................................................................................ 51
4.10.1. Constants......................................................................................................... 51
4.10.2. Symbol Names ................................................................................................ 51
4.10.3. The Location Counter ..................................................................................... 51
4.10.4. Operators......................................................................................................... 52
4.10.5. Evaluation ....................................................................................................... 53
4.10.6. The Section of an Expression ......................................................................... 53
4.10.7. Builtin Functions............................................................................................. 54
4.11. Implicit Linker Scripts ................................................................................................... 56
5. Machine Dependent Features ...................................................................................................... 59
5.1.
and the H8/300............................................................................................................ 59
ld
5.2.
and the Intel 960 Family ............................................................................................. 59
ld
5.3.
's Support for Interworking Between ARM and Thumb Code ................................... 59
ld
5.4.
and HPPA 32-bit ELF Support ................................................................................... 60
ld
5.5.
and MMIX .................................................................................................................. 60
ld
5.6.
and MSP430 ............................................................................................................... 60
ld
5.7.
's Support for Various TI COFF Versions ................................................................... 61
ld
5.8.
and WIN32 (cygwin/mingw)...................................................................................... 61
ld
5.9.
and Xtensa Processors ................................................................................................ 65
ld

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents