JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Linker and Libraries Guide     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

Part I Using the Link-Editor and Runtime Linker

1.  Introduction to the Oracle Solaris Link Editors

2.  Link-Editor

3.  Runtime Linker

4.  Shared Objects

Part II Quick Reference

5.  Link-Editor Quick Reference

Part III Advanced Topics

6.  Direct Bindings

7.  Building Objects to Optimize System Performance

8.  Mapfiles

Mapfile Structure and Syntax

Mapfile Version

Conditional Input

Directive Syntax

Mapfile Directives

CAPABILITY Directive

HW Attribute

HW_1 / HW_2 Attributes

MACHINE Attribute

PLATFORM Attribute

SF Attribute

SF_1 Attribute

DEPEND_VERSIONS Directive

ALLOW Attribute

REQUIRE Attribute

HDR_NOALLOC Directive

PHDR_ADD_NULL Directive

LOAD_SEGMENT / NOTE_SEGMENT / NULL_SEGMENT Directives

ALIGN Attribute (LOAD_SEGMENT only)

ASSIGN_SECTION Attribute

DISABLE Attribute

FLAGS Attribute (LOAD_SEGMENT only)

IS_ORDER Attribute

MAX_SIZE Attribute (LOAD_SEGMENT only)

NOHDR Attribute (LOAD_SEGMENT only)

OS_ORDER Attribute

PADDR Attribute (LOAD_SEGMENT only)

ROUND Attribute (LOAD_SEGMENT only)

SIZE_SYMBOL Attribute (LOAD_SEGMENT only)

VADDR (LOAD_SEGMENT only)

SEGMENT_ORDER Directive

STACK Directive

STUB_OBJECT Directive

SYMBOL_SCOPE / SYMBOL_VERSION Directives

ASSERT Attribute

AUXILIARY Attribute

FILTER Attribute

FLAGS Attribute

SIZE Attribute

TYPE Attribute

VALUE Attribute

Predefined Segments

Mapping Examples

Example: Section to Segment Assignment

Example: Predefined Section Modification

Link-Editor Internals: Section and Segment Processing

Section To Segment Assignment

Mapfile Directives for Predefined Segments and Entrance Criteria

9.  Interfaces and Versioning

10.  Establishing Dependencies with Dynamic String Tokens

11.  Extensibility Mechanisms

Part IV ELF Application Binary Interface

12.  Object File Format

13.  Program Loading and Dynamic Linking

14.  Thread-Local Storage

Part V Appendices

A.  Linker and Libraries Updates and New Features

B.  System V Release 4 (Version 1) Mapfiles

Index

Chapter 8

Mapfiles

Mapfiles provide a large degree of control over the operation of the link-editor, and the resulting output object.


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.