
SYSTEM V APPLICATION BINARY INTERFACE Edition 3.1 Contents Table of Contents Table of Contents INTRODUCTION SOFTWARE INSTALLATION LOW-LEVEL SYSTEM INFORMATION OBJECT FILES PROGRAM LOADING AND DYNAMIC LINKING LIBRARIES FORMATS AND PROTOCOLS SYSTEM COMMANDS EXECUTION ENVIRONMENT WINDOWING AND TERMINAL INTERFACES DEVELOPMENT ENVIRONMENTS FOR AN ABI SYSTEM NETWORKING Index INTRODUCTION 1 System V Application Binary Interface 1-1 Foundations and Structure of the ABI 1-2 How to Use the System V ABI 1-4 De®nitions of Terms 1-8 SOFTWARE INSTALLATION 2 Software Installation and Packaging 2-1 File Formats 2-7 File Tree for Add-on Software 2-15 Commands That Install, Remove and Access Packages 2-16 Table of Contents i LOW-LEVEL SYSTEM INFORMATION 3 Introduction 3-1 Character Representations 3-2 Machine Interface (Processor-Speci®c) 3-3 Function Calling Sequence (Processor-Speci®c) 3-4 Operating System Interface (Processor-Speci®c) 3-5 Coding Examples (Processor-Speci®c) 3-6 OBJECT FILES 4 Introduction 4-1 ELF Header 4-4 Sections 4-10 String Table 4-21 Symbol Table 4-22 Relocation 4-27 PROGRAM LOADING AND DYNAMIC 5 LINKING Introduction 5-1 Program Header 5-2 Program Loading (Processor-Speci®c) 5-11 Dynamic Linking 5-12 LIBRARIES 6 Introduction 6-1 System Library 6-4 C Library 6-10 Network Services Library 6-15 Socket Library 6-18 Curses Library 6-19 X Window System Library 6-23 X Toolkit Intrinsics Library 6-29 System Data Interfaces 6-33 ii Table of Contents FORMATS AND PROTOCOLS 7 Introduction 7-1 Archive File 7-2 Other Archive Formats 7-6 Terminfo Data Base 7-7 Formats and Protocols for Networking 7-10 SYSTEM COMMANDS 8 Commands for Application Programs 8-1 EXECUTION ENVIRONMENT 9 Application Environment 9-1 File System Structure and Contents 9-3 WINDOWING AND TERMINAL INTERFACES 10 The System V Window System 10-1 System V Window System Components 10-3 DEVELOPMENT ENVIRONMENTS FOR AN 11 ABI SYSTEM Development Environments 11-1 NETWORKING 12 Networking 12-1 Required STREAMS Devices and Modules 12-2 Required Interprocess Communication Support 12-3 Required Transport Layer Support 12-4 Required Transport Loopback Support 12-7 Optional Internet Transport Support 12-8 Table of Contents iii Index IN Index IN-1 iv Table of Contents Figures and Tables Figure 2-1: Package File Tree Organization 2-2 Figure 2-2: Data Stream File Layout for Distribution Media 2-4 Figure 4-1: Object File Format 4-1 Figure 4-2: 32-Bit Data Types 4-3 Figure 4-3: ELF Header 4-4 Figure 4-4: e_ i d e n t [ ] Identi®cation Indexes 4-7 Figure 4-5: Data Encoding EL F D A T A 2 L S B 4-9 Figure 4-6: Data Encoding EL F D A T A 2 M S B 4-9 Figure 4-7: Special Section Indexes 4-10 Figure 4-8: Section Header 4-12 Figure 4-9: Section Types, sh _ t y p e 4-13 Figure 4-10: Section Header Table Entry: Index 0 4-15 Figure 4-11: Section Attribute Flags, sh _ f l a g s 4-16 Figure 4-12: sh _ l i n k and sh _ i n f o Interpretation 4-17 Figure 4-13: Special Sections 4-17 Figure 4-14: String Table Indexes 4-21 Figure 4-15: Symbol Table Entry 4-22 Figure 4-16: Symbol Binding, EL F 3 2 _ S T _ B I N D 4-23 Figure 4-17: Symbol Types, EL F 3 2 _ S T _ T Y P E 4-24 Figure 4-18: Symbol Table Entry: Index 0 4-26 Figure 4-19: Relocation Entries 4-27 Figure 5-1: Program Header 5-2 Figure 5-2: Segment Types, p_ t y p e 5-3 Figure 5-3: Segment Flag Bits, p_ f l a g s 5-6 Figure 5-4: Segment Permissions 5-6 Figure 5-5: Text Segment 5-7 Figure 5-6: Data Segment 5-7 Figure 5-7: Note Information 5-8 Figure 5-8: Example Note Segment 5-9 Figure 5-9: Dynamic Structure 5-15 Figure 5-10: Dynamic Array Tags, d_ t a g 5-15 Figure 5-11: Symbol Hash Table 5-21 Figure 5-12: Hashing Function 5-22 Figure 6-1: Shared Library Names 6-2 Figure 6-2: li b s y s Contents, Names with Synonyms 6-5 Table of Contents v Figure 6-3: li b s y s Contents, Names Without Synonyms 6-6 Figure 6-4: li b s y s Contents, Additional Services 6-6 Figure 6-5: li b s y s Contents, Global External Data Symbols 6-7 Figure 6-6: li b c Contents, Names without Synonyms 6-10 Figure 6-7: li b c Contents from XSH4.2, Names without Synonyms 6-11 Figure 6-8: li b c Contents, Names with Synonyms 6-11 Figure 6-9: li b c Contents from XSH4.2, Names with Synonyms 6-12 Figure 6-10: li b c Contents, Names without Synonyms, non-ANSI 6-12 Figure 6-11: li b c Contents, Global External Data Symbols 6-13 Figure 6-12: li b n s l Contents, Part 1 of 3 6-15 Figure 6-13: li b n s l Contents, Part 2 of 3 6-15 Figure 6-14: li b n s l Contents, Part 3 of 3 6-16 Figure 6-15: li b n s l Contents, Global External Data Symbols 6-17 Figure 6-16: li b s o c k e t Contents, Part 1 of 2 6-18 Figure 6-18: li b s o c k e t Contents, Part 2 of 2 6-18 Figure 6-19: li b c u r s e s Contents 6-19 Figure 6-20: li b c u r s e s Contents, Global External Data Symbols 6-22 Figure 6-21: li b X Contents 6-23 Figure 6-22: li b X 1 1 Contents, Callback Function Names 6-28 Figure 6-23: li b X t Contents 6-29 Figure 6-24: li b X t Contents, Global External Data Symbols 6-31 Figure 6-25: Minimum Sizes of Fundamental Data Objects 6-34 Figure 7-1: <a r . h > 7-2 Figure 7-2: Example String Table 7-4 Figure 7-3: Archive Word Encoding 7-4 Figure 7-4: Example Symbol Table 7-5 Figure 8-1: Commands required in an ABI Run-time Environment 8-1 Figure 8-2: XPG4.2 Commands required in an ABI Run-time Environment 8-2 Figure 9-1: Required Devices in an ABI Run-time Environment 9-4 Figure 11-1: Required li b m Functions 11-4 Figure 12-1: Required STREAMS Devices 12-2 Figure 12-2: Required STREAMS Modules 12-2 Figure 12-3: TLI-XTI Error Codes 12-4 Figure 12-4: t_ l o o k Events 12-4 Figure 12-5: XTI Flag De®nitions 12-5 Figure 12-6: XTI Service Types 12-5 Figure 12-7: Flags to be used with t_ a l l o c 12-5 Figure 12-8: XTI Application States 12-5 Figure 12-9: XTI values for t_info ¯ags member 12-6 Figure 12-10: TCP Options 12-10 Figure 12-11: IP Options 12-10 Figure 12-12: TCP Options 12-11 Figure 12-13: UDP Options 12-11 Figure 12-14: IP Options 12-12 Figure 12-15: Data Structures 12-13 vi Table of Contents 1 INTRODUCTION System V Application Binary Interface 1-1 Foundations and Structure of the ABI 1-2 Conformance Rule 1-2 How to Use the System V ABI 1-4 Base and Optional Components of the ABI 1-6 Evolution of the ABI Speci®cation 1-7 De®nitions of Terms 1-8 Table of Contents i System V Application Binary Interface The System V Application Binary Interface, or ABI, de®nes a system interface for compiled application programs and a minimal environment for support of instal- E lation scripts. Its purpose is to document a standard binary interface for applica- tion programs on systems that implement an operating system that complies with X the X/Open Common Application Environment Speci®cation, Issue 4.2 and the System X V Interface De®nition, Third Edition. The ABI de®nes a binary interface for application programs that are compiled and packaged for System V implementations on many different hardware architec- tures. Since a binary speci®cation must include information speci®c to the com- puter processor architecture for which it is intended, it is not possible for a single document to specify the interface for all possible System V implementations. Therefore, the System V ABI is a family of speci®cations, rather than a single one. The System V ABI is composed of two basic parts: A generic part of the speci®cation describes those parts of the interface that remain constant across all hardware implementations of System V, and a processor-speci®c part of the speci®cation describes the parts of the speci®cation that are speci®c to a particular processor architecture. Together, the generic ABI and the processor-speci®c sup- plement for a single hardware architecture provide a complete interface speci®cation for compiled application programs on systems that share a common hardware architecture. This document is the generic ABI. It must be used in conjunction with a supple- mental speci®cation containing processor-speci®c information.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages240 Page
-
File Size-