Skip Navigation Links | |
Exit Print View | |
Oracle Solaris 11.1 Linkers and Libraries Guide Oracle Solaris 11.1 Information Library |
Part I Using the Link-Editor and Runtime Linker
1. Introduction to the Oracle Solaris Link Editors
5. Link-Editor Quick Reference
7. Building Objects to Optimize System Performance
LOAD_SEGMENT / NOTE_SEGMENT / NULL_SEGMENT Directives
ALIGN Attribute (LOAD_SEGMENT only)
FLAGS Attribute (LOAD_SEGMENT only)
MAX_SIZE Attribute (LOAD_SEGMENT only)
NOHDR Attribute (LOAD_SEGMENT only)
PADDR Attribute (LOAD_SEGMENT only)
ROUND Attribute (LOAD_SEGMENT only)
SIZE_SYMBOL Attribute (LOAD_SEGMENT only)
SYMBOL_SCOPE / SYMBOL_VERSION Directives
Example: Section to Segment Assignment
Example: Predefined Section Modification
Link-Editor Internals: Section and Segment Processing
Mapfile Directives for Predefined Segments and Entrance Criteria
10. Establishing Dependencies with Dynamic String Tokens
Part IV ELF Application Binary Interface
13. Program Loading and Dynamic Linking
A. Linker and Libraries Updates and New Features
Mapfiles provide a large degree of control over the operation of the link-editor, and the resulting output object.
Create and/or modify output segments.
Define how input sections are assigned to segments, and the relative order of those sections.
Specify symbol scope and/or versioning, creating stable backward compatible interfaces for sharable objects.
Define the versions to use from sharable object dependencies.
Set header options in the output object.
Set process stack attributes for a dynamic executable.
Set or override hardware and software capabilities.
Note - The link-editor used without a mapfile will always produce a valid ELF output file. The mapfile option provides the user with a great deal of flexibility and control over the output object, some of which has the potential to produce an invalid or unusable object. The user is expected to have knowledge of the rules and conventions that govern the ELF format.
The -M command line option is used to specify the mapfile to be used. Multiple mapfiles can be used in a single link operation. When more than one mapfile is specified, the link-editor processes each one in the order given, as if they represented a single logical mapfile. This occurs before any input objects are processed.
The system provides sample mapfiles for solving common problems in the /usr/lib/ld directory.