1 Linux Standard Base Core Specification 3.2 2 3 Copyright © 2007 Linux Foundation 4 5 Permission is granted to copy, distribute and/or modify this 6 document under the terms of the GNU Free Documentation License, 7 Version 1.1; with no Invariant Sections, with no Front-Cover 8 Texts, and with no Back-Cover Texts. A copy of the license is 9 included in the section entitled "GNU Free Documentation 10 License". 11 12 Portions of the text may be copyrighted by the following 13 parties: 14 15 * The Regents of the University of California 16 * Free Software Foundation 17 * Ian F. Darwin 18 * Paul Vixie 19 * BSDI (now Wind River) 20 * Andrew G Morgan 21 * Jean-loup Gailly and Mark Adler 22 * Massachusetts Institute of Technology 23 * Apple Inc. 24 * Easy Software Products 25 * artofcode LLC 26 * Till Kamppeter 27 * Manfred Wassman 28 * Python Software Foundation 29 30 These excerpts are being used in accordance with their 31 respective licenses. 32 33 Linux is the registered trademark of Linus Torvalds in the U.S. 34 and other countries. 35 36 UNIX is a registered trademark of The Open Group. 37 38 LSB is a trademark of the Linux Foundation in the United States 39 and other countries. 40 41 AMD is a trademark of Advanced Micro Devices, Inc. 42 43 Intel and Itanium are registered trademarks and Intel386 is a 44 trademark of Intel Corporation. 45 46 PowerPC is a registered trademark and PowerPC Architecture is a 47 trademark of the IBM Corporation. 48 49 S/390 is a registered trademark of the IBM Corporation. 50 51 OpenGL is a registered trademark of Silicon Graphics, Inc. 52 __________________________________________________________ 53 54 Table of Contents 55 Foreword 56 Introduction 57 I. Introductory Elements 58 59 1. Scope 60 61 1.1. General 62 1.2. Module Specific Scope 63 64 2. References 65 66 2.1. Normative References 67 2.2. Informative References/Bibliography 68 69 3. Requirements 70 71 3.1. Relevant Libraries 72 3.2. LSB Implementation Conformance 73 3.3. LSB Application Conformance 74 75 4. Definitions 76 5. Terminology 77 6. Documentation Conventions 78 7. Relationship To ISO/IEC 9945 POSIX 79 8. Relationship To Other Linux Foundation Specifications 80 81 II. Executable And Linking Format (ELF) 82 83 9. Introduction 84 10. Low Level System Information 85 86 10.1. Operating System Interface 87 10.2. Machine Interface 88 89 11. Object Format 90 91 11.1. Object Files 92 11.2. Sections 93 11.3. Special Sections 94 11.4. Symbol Mapping 95 11.5. DWARF Extensions 96 11.6. Exception Frames 97 11.7. Symbol Versioning 98 11.8. ABI note tag 99 100 12. Dynamic Linking 101 102 12.1. Program Loading and Dynamic Linking 103 12.2. Program Header 104 12.3. Dynamic Entries 105 106 III. Base Libraries 107 108 13. Base Libraries 109 110 13.1. Introduction 111 13.2. Program Interpreter 112 13.3. Interfaces for libc 113 13.4. Data Definitions for libc 114 13.5. Interface Definitions for libc 115 13.6. Interfaces for libm 116 13.7. Data Definitions for libm 117 13.8. Interface Definitions for libm 118 13.9. Interfaces for libpthread 119 13.10. Data Definitions for libpthread 120 13.11. Interface Definitions for libpthread 121 13.12. Interfaces for libgcc_s 122 13.13. Data Definitions for libgcc_s 123 13.14. Interfaces for libdl 124 13.15. Data Definitions for libdl 125 13.16. Interface Definitions for libdl 126 13.17. Interfaces for librt 127 13.18. Data Definitions for librt 128 13.19. Interfaces for libcrypt 129 13.20. Interfaces for libpam 130 13.21. Data Definitions for libpam 131 13.22. Interface Definitions for libpam 132 133 IV. Utility Libraries 134 135 14. Utility Libraries 136 137 14.1. Introduction 138 14.2. Interfaces for libz 139 14.3. Data Definitions for libz 140 14.4. Interface Definitions for libz 141 14.5. Interfaces for libncurses 142 14.6. Data Definitions for libncurses 143 14.7. Interfaces for libutil 144 14.8. Interface Definitions for libutil 145 146 V. Commands and Utilities 147 148 15. Commands and Utilities 149 150 15.1. Commands and Utilities 151 15.2. Command Behavior 152 153 VI. Execution Environment 154 155 16. File System Hierarchy 156 157 16.1. /dev: Device Files 158 16.2. /etc: Host-specific system configuration 159 16.3. User Accounting Databases 160 16.4. Path For System Administration Utilities 161 162 17. Additional Recommendations 163 164 17.1. Recommendations for applications on ownership 165 and permissions 166 167 18. Additional Behaviors 168 169 18.1. Mandatory Optional Behaviors 170 171 19. Localization 172 173 19.1. Introduction 174 19.2. Regular Expressions 175 19.3. Pattern Matching Notation 176 177 VII. System Initialization 178 179 20. System Initialization 180 181 20.1. Cron Jobs 182 20.2. Init Script Actions 183 20.3. Comment Conventions for Init Scripts 184 20.4. Installation and Removal of Init Scripts 185 20.5. Run Levels 186 20.6. Facility Names 187 20.7. Script Names 188 20.8. Init Script Functions 189 190 VIII. Users & Groups 191 192 21. Users & Groups 193 194 21.1. User and Group Database 195 21.2. User & Group Names 196 21.3. User ID Ranges 197 21.4. Rationale 198 199 IX. Package Format and Installation 200 201 22. Software Installation 202 203 22.1. Introduction 204 22.2. Package File Format 205 22.3. Package Script Restrictions 206 22.4. Package Tools 207 22.5. Package Naming 208 22.6. Package Dependencies 209 22.7. Package Architecture Considerations 210 211 A. Alphabetical Listing of Interfaces 212 213 A.1. libc 214 A.2. libcrypt 215 A.3. libdl 216 A.4. libm 217 A.5. libncurses 218 A.6. libpam 219 A.7. libpthread 220 A.8. librt 221 A.9. libutil 222 A.10. libz 223 224 B. Future Directions (Informative) 225 226 B.1. Introduction 227 B.2. Commands And Utilities 228 229 lsbinstall -- installation tool for various types of 230 data 231 232 C. GNU Free Documentation License (Informative) 233 234 C.1. PREAMBLE 235 C.2. APPLICABILITY AND DEFINITIONS 236 C.3. VERBATIM COPYING 237 C.4. COPYING IN QUANTITY 238 C.5. MODIFICATIONS 239 C.6. COMBINING DOCUMENTS 240 C.7. COLLECTIONS OF DOCUMENTS 241 C.8. AGGREGATION WITH INDEPENDENT WORKS 242 C.9. TRANSLATION 243 C.10. TERMINATION 244 C.11. FUTURE REVISIONS OF THIS LICENSE 245 C.12. How to use this License for your documents 246 247 List of Figures 248 11-1. Version Definition Entries 249 11-2. Version Definition Auxiliary Entries 250 11-3. Version Needed Entries 251 11-4. Version Needed Auxiliary Entries 252 12-1. Dynamic Structure 253 254 List of Tables 255 2-1. Normative References 256 2-2. Other References 257 3-1. Standard Library Names 258 3-2. Standard Library Names defined in the Architecture 259 Specific Parts of ISO/IEC 23360 260 261 10-1. Scalar Types 262 11-1. ELF Section Types 263 11-2. Additional Section Types 264 11-3. ELF Special Sections 265 11-4. Additional Special Sections 266 11-5. DWARF Exception Header value format 267 11-6. DWARF Exception Header application 268 11-7. Additional DWARF Call Frame Instructions 269 11-8. Call Frame Information Format 270 11-9. Common Information Entry Format 271 11-10. Frame Description Entry Format 272 11-11. .eh_frame_hdr Section Format 273 12-1. Linux Segment Types 274 13-1. libc Definition 275 13-2. libc - RPC Function Interfaces 276 13-3. libc - System Calls Function Interfaces 277 13-4. libc - System Calls Deprecated Function Interfaces 278 13-5. libc - Standard I/O Function Interfaces 279 13-6. libc - Standard I/O Data Interfaces 280 13-7. libc - Signal Handling Function Interfaces 281 13-8. libc - Signal Handling Deprecated Function Interfaces 282 13-9. libc - Signal Handling Data Interfaces 283 13-10. libc - Localization Functions Function Interfaces 284 13-11. libc - Localization Functions Data Interfaces 285 13-12. libc - Posix Spawn Option Function Interfaces 286 13-13. libc - Posix Advisory Option Function Interfaces 287 13-14. libc - Socket Interface Function Interfaces 288 13-15. libc - Socket Interface Data Interfaces 289 13-16. libc - Wide Characters Function Interfaces 290 13-17. libc - String Functions Function Interfaces 291 13-18. libc - String Functions Deprecated Function Interfaces 292 13-19. libc - IPC Functions Function Interfaces 293 13-20. libc - Regular Expressions Function Interfaces 294 13-21. libc - Character Type Functions Function Interfaces 295 13-22. libc - Time Manipulation Function Interfaces 296 13-23. libc - Time Manipulation Data Interfaces 297 13-24. libc - Terminal Interface Functions Function Interfaces 298 13-25. libc - System Database Interface Function Interfaces 299 13-26. libc - System Database Interface Deprecated Function 300 Interfaces 301 302 13-27. libc - Language Support Function Interfaces 303 13-28. libc - Large File Support Function Interfaces 304 13-29. libc - Large File Support Deprecated Function Interfaces 305 13-30. libc - Standard Library Function Interfaces 306 13-31. libc - Standard Library Deprecated Function Interfaces 307 13-32. libc - Standard Library Data Interfaces 308 13-33. libm Definition 309 13-34. libm - Math Function Interfaces 310 13-35. libm - Math Deprecated Function Interfaces 311 13-36. libm - Math Data Interfaces 312 13-37. libpthread Definition 313 13-38. libpthread - Realtime Threads Function Interfaces 314 13-39. libpthread - Advanced Realtime Threads Function 315 Interfaces 316 317 13-40. libpthread - Posix Threads Function Interfaces 318 13-41. libpthread - Posix Threads Deprecated Function 319 Interfaces 320 321 13-42. libpthread - Thread aware versions of libc interfaces 322 Function Interfaces 323 324 13-43. libgcc_s Definition 325 13-44. libdl Definition 326 13-45. libdl - Dynamic Loader Function Interfaces 327 13-46. librt Definition 328 13-47. librt - Shared Memory Objects Function Interfaces 329 13-48. librt - Clock Function Interfaces 330 13-49. librt - Timers Function Interfaces 331 13-50. librt - Message Queues Function Interfaces 332 13-51. libcrypt Definition 333 13-52. libcrypt - Encryption Function Interfaces 334 13-53. libpam Definition 335 13-54. libpam - Pluggable Authentication API Function 336 Interfaces 337 338 14-1. libz Definition 339 14-2. libz - Compression Library Function Interfaces 340 14-3. libncurses Definition 341 14-4. libncurses - Curses Function Interfaces 342 14-5. libncurses - Curses Data Interfaces 343 14-6. libutil Definition 344 14-7. libutil - Utility Functions Function Interfaces 345 15-1. Commands And Utilities 346 15-2. Built In Utilities 347 15-1. Escape Sequences 348 21-1. Required User & Group Names 349 21-2. Optional User & Group Names 350 22-1. RPM File Format 351 22-2. Signature Format 352 22-3. Index Type values 353 22-4. Header Private Tag Values 354 22-5. Signature Tag Values 355 22-6. Signature Digest Tag Values 356 22-7. Signature Signing Tag Values 357 22-8. Package Info Tag Values 358 22-9. Installation Tag Values 359 22-10. File Info Tag Values 360 22-11. File Flags 361 22-12. Package Dependency Tag Values 362 22-13. Index Type values 363 22-14. Package Dependency Attributes 364 22-15. Other Tag Values 365 22-16. CPIO File Format 366 A-1. libc Function Interfaces 367 A-2. libc Data Interfaces 368 A-3. libcrypt Function Interfaces 369 A-4. libdl Function Interfaces 370 A-5. libm Function Interfaces 371 A-6. libm Data Interfaces 372 A-7. libncurses Function Interfaces 373 A-8. libncurses Data Interfaces 374 A-9. libpam Function Interfaces 375 A-10. libpthread Function Interfaces 376 A-11. librt Function Interfaces 377 A-12. libutil Function Interfaces 378 A-13. libz Function Interfaces 379 __________________________________________________________ 380 381 Foreword 382 383 This is version 3.2 of the Linux Standard Base Core 384 Specification. This specification is part of a family of 385 specifications under the general title "Linux Standard Base". 386 Developers of applications or implementations interested in 387 using the LSB trademark should see the Linux Foundation 388 Certification Policy for details. 389 __________________________________________________________ 390 391 Introduction 392 393 The LSB defines a binary interface for application programs 394 that are compiled and packaged for LSB-conforming 395 implementations on many different hardware architectures. Since 396 a binary specification shall include information specific to 397 the computer processor architecture for which it is intended, 398 it is not possible for a single document to specify the 399 interface for all possible LSB-conforming implementations. 400 Therefore, the LSB is a family of specifications, rather than a 401 single one. 402 403 This document should be used in conjunction with the documents 404 it references. This document enumerates the system components 405 it includes, but descriptions of those components may be 406 included entirely or partly in this document, partly in other 407 documents, or entirely in other reference documents. For 408 example, the section that describes system service routines 409 includes a list of the system routines supported in this 410 interface, formal declarations of the data structures they use 411 that are visible to applications, and a pointer to the 412 underlying referenced specification for information about the 413 syntax and semantics of each call. Only those routines not 414 described in standards referenced by this document, or 415 extensions to those standards, are described in the detail. 416 Information referenced in this way is as much a part of this 417 document as is the information explicitly included here. 418 419 The specification carries a version number of either the form 420 x.y or x.y.z. This version number carries the following 421 meaning: 422 423 * The first number (x) is the major version number. All 424 versions with the same major version number should share 425 binary compatibility. Any addition or deletion of a new 426 library results in a new version number. Interfaces marked 427 as deprecated may be removed from the specification at a 428 major version change. 429 * The second number (y) is the minor version number. 430 Individual interfaces may be added if all certified 431 implementations already had that (previously undocumented) 432 interface. Interfaces may be marked as deprecated at a 433 minor version change. Other minor changes may be permitted 434 at the discretion of the LSB workgroup. 435 * The third number (z), if present, is the editorial level. 436 Only editorial changes should be included in such versions. 437 438 Since this specification is a descriptive Application Binary 439 Interface, and not a source level API specification, it is not 440 possible to make a guarantee of 100% backward compatibility 441 between major releases. However, it is the intent that those 442 parts of the binary interface that are visible in the source 443 level API will remain backward compatible from version to 444 version, except where a feature marked as "Deprecated" in one 445 release may be removed from a future release. 446 447 Implementors are strongly encouraged to make use of symbol 448 versioning to permit simultaneous support of applications 449 conforming to different releases of this specification. 450 451 I. Introductory Elements 452 453 Table of Contents 454 1. Scope 455 456 1.1. General 457 1.2. Module Specific Scope 458 459 2. References 460 461 2.1. Normative References 462 2.2. Informative References/Bibliography 463 464 3. Requirements 465 466 3.1. Relevant Libraries 467 3.2. LSB Implementation Conformance 468 3.3. LSB Application Conformance 469 470 4. Definitions 471 5. Terminology 472 6. Documentation Conventions 473 7. Relationship To ISO/IEC 9945 POSIX 474 8. Relationship To Other Linux Foundation Specifications 475 __________________________________________________________ 476 477 Chapter 1. Scope 478 479 1.1. General 480 481 The Linux Standard Base (LSB) defines a system interface for 482 compiled applications and a minimal environment for support of 483 installation scripts. Its purpose is to enable a uniform 484 industry standard environment for high-volume applications 485 conforming to the LSB. 486 487 These specifications are composed of two basic parts: A common 488 specification ("LSB-generic" or "generic LSB"), ISO/IEC 23360 489 Part 1, describing those parts of the interface that remain 490 constant across all implementations of the LSB, and an 491 architecture-specific part ("LSB-arch" or "archLSB") describing 492 the parts of the interface that vary by processor architecture. 493 Together, the LSB-generic and the relevant 494 architecture-specific part of ISO/IEC 23360 for a single 495 hardware architecture provide a complete interface 496 specification for compiled application programs on systems that 497 share a common hardware architecture. 498 499 ISO/IEC 23360 Part 1, the LSB-generic document, should be used 500 in conjunction with an architecture-specific part. Whenever a 501 section of the LSB-generic specification is supplemented by 502 architecture-specific information, the LSB-generic document 503 includes a reference to the architecture part. 504 Architecture-specific parts of ISO/IEC 23360 may also contain 505 additional information that is not referenced in the 506 LSB-generic document. 507 508 The LSB contains both a set of Application Program Interfaces 509 (APIs) and Application Binary Interfaces (ABIs). APIs may 510 appear in the source code of portable applications, while the 511 compiled binary of that application may use the larger set of 512 ABIs. A conforming implementation provides all of the ABIs 513 listed here. The compilation system may replace (e.g. by macro 514 definition) certain APIs with calls to one or more of the 515 underlying binary interfaces, and may insert calls to binary 516 interfaces as needed. 517 518 The LSB is primarily a binary interface definition. Not all of 519 the source level APIs available to applications may be 520 contained in this specification. 521 __________________________________________________________ 522 523 1.2. Module Specific Scope 524 525 This is the Core module of the Linux Standard Base (LSB), 526 ISO/IEC 23360 Part 1. This module provides the fundamental 527 system interfaces, libraries, and runtime environment upon 528 which all conforming applications and libraries depend. 529 530 Interfaces described in this part of ISO/IEC 23360 are 531 mandatory except where explicitly listed otherwise. Core 532 interfaces may be supplemented by other modules; all modules 533 are built upon the core. 534 __________________________________________________________ 535 536 Chapter 2. References 537 538 2.1. Normative References 539 540 The following referenced documents are indispensable for the 541 application of this document. For dated references, only the 542 edition cited applies. For undated references, the latest 543 edition of the referenced document (including any amendments) 544 applies. 545 546 Note: Where copies of a document are available on the World 547 Wide Web, a Uniform Resource Locator (URL) is given for 548 informative purposes only. This may point to a more recent 549 copy of the referenced specification, or may be out of date. 550 Reference copies of specifications at the revision level 551 indicated may be found at the Linux Foundation's Reference 552 Specifications site. 553 554 Table 2-1. Normative References 555 Name Title URL 556 Filesystem Hierarchy Standard Filesystem Hierarchy Standard 557 (FHS) 2.3 http://www.pathname.com/fhs/ 558 ISO C (1999) ISO/IEC 9899: 1999, Programming Languages --C 559 ISO POSIX (2003) 560 561 ISO/IEC 9945-1:2003 Information technology -- Portable 562 Operating System Interface (POSIX) -- Part 1: Base Definitions 563 564 ISO/IEC 9945-2:2003 Information technology -- Portable 565 Operating System Interface (POSIX) -- Part 2: System Interfaces 566 567 ISO/IEC 9945-3:2003 Information technology -- Portable 568 Operating System Interface (POSIX) -- Part 3: Shell and 569 Utilities 570 571 ISO/IEC 9945-4:2003 Information technology -- Portable 572 Operating System Interface (POSIX) -- Part 4: Rationale 573 574 Including Technical Cor. 1: 2004 575 http://www.unix.org/version3/ 576 Itanium(TM) C++ ABI Itanium(TM) C++ ABI (Revision 1.83) 577 http://refspecs.linux-foundation.org/cxxabi-1.83.html 578 Large File Support Large File Support 579 http://www.UNIX-systems.org/version2/whatsnew/lfs20mar.html 580 SUSv2 CAE Specification, January 1997, System Interfaces and 581 Headers (XSH),Issue 5 (ISBN: 1-85912-181-0, C606) 582 http://www.opengroup.org/publications/catalog/un.htm 583 SVID Issue 3 American Telephone and Telegraph Company, System V 584 Interface Definition, Issue 3; Morristown, NJ, UNIX Press, 585 1989. (ISBN 0201566524) 586 SVID Issue 4 System V Interface Definition, Fourth Edition 587 System V ABI System V Application Binary Interface, Edition 4.1 588 http://www.caldera.com/developers/devspecs/gabi41.pdf 589 System V ABI Update System V Application Binary Interface - 590 DRAFT - 17 December 2003 591 http://www.caldera.com/developers/gabi/2003-12-17/contents.html 592 X/Open Curses CAE Specification, May 1996, X/Open Curses, Issue 593 4, Version 2 (ISBN: 1-85912-171-3, C610), plus Corrigendum U018 594 http://www.opengroup.org/publications/catalog/un.htm 595 __________________________________________________________ 596 597 2.2. Informative References/Bibliography 598 599 In addition, the specifications listed below provide essential 600 background information to implementors of this specification. 601 These references are included for information only. 602 603 Table 2-2. Other References 604 Name Title URL 605 DWARF Debugging Information Format, Revision 2.0.0 DWARF 606 Debugging Information Format, Revision 2.0.0 (July 27, 1993) 607 http://refspecs.linux-foundation.org/dwarf/dwarf-2.0.0.pdf 608 DWARF Debugging Information Format, Revision 3.0.0 (Draft) 609 DWARF Debugging Information Format, Revision 3.0.0 (Draft) 610 http://refspecs.linux-foundation.org/dwarf 611 IEC 60559/IEEE 754 Floating Point IEC 60559:1989 Binary 612 floating-point arithmetic for microprocessor systems 613 http://www.ieee.org/ 614 ISO/IEC TR14652 ISO/IEC Technical Report 14652:2002 615 Specification method for cultural conventions 616 ITU-T V.42 International Telecommunication Union Recommendation 617 V.42 (2002): Error-correcting procedures for DCEs using 618 asynchronous-to-synchronous conversionITUV 619 http://www.itu.int/rec/recommendation.asp?type=folders&lang=e&p 620 arent=T-REC-V.42 621 Li18nux Globalization Specification LI18NUX 2000 Globalization 622 Specification, Version 1.0 with Amendment 4 623 http://www.openi18n.org/docs/html/LI18NUX-2000-amd4.htm 624 Linux Allocated Device Registry LINUX ALLOCATED DEVICES 625 http://www.lanana.org/docs/device-list/devices.txt 626 PAM Open Software Foundation, Request For Comments: 86.0 , 627 October 1995, V. Samar & R.Schemers (SunSoft) 628 http://www.opengroup.org/tech/rfc/mirror-rfc/rfc86.0.txt 629 RFC 1321: The MD5 Message-Digest Algorithm IETF RFC 1321: The 630 MD5 Message-Digest Algorithm 631 http://www.ietf.org/rfc/rfc1321.txt 632 RFC 1831/1832 RPC & XDR IETF RFC 1831 & 1832 633 http://www.ietf.org/ 634 RFC 1833: Binding Protocols for ONC RPC Version 2 IETF RFC 635 1833: Binding Protocols for ONC RPC Version 2 636 http://www.ietf.org/rfc/rfc1833.txt 637 RFC 1950: ZLIB Compressed Data Format Specication IETF RFC 638 1950: ZLIB Compressed Data Format Specification 639 http://www.ietf.org/rfc/rfc1950.txt 640 RFC 1951: DEFLATE Compressed Data Format Specification IETF RFC 641 1951: DEFLATE Compressed Data Format Specification version 1.3 642 http://www.ietf.org/rfc/rfc1951.txt 643 RFC 1952: GZIP File Format Specification IETF RFC 1952: GZIP 644 file format specification version 4.3 645 http://www.ietf.org/rfc/rfc1952.txt 646 RFC 2440: OpenPGP Message Format IETF RFC 2440: OpenPGP Message 647 Format http://www.ietf.org/rfc/rfc2440.txt 648 RFC 2821:Simple Mail Transfer Protocol IETF RFC 2821: Simple 649 Mail Transfer Protocol http://www.ietf.org/rfc/rfc2821.txt 650 RFC 2822:Internet Message Format IETF RFC 2822: Internet 651 Message Format http://www.ietf.org/rfc/rfc2822.txt 652 RFC 791:Internet Protocol IETF RFC 791: Internet Protocol 653 Specification http://www.ietf.org/rfc/rfc791.txt 654 RPM Package Format RPM Package Format V3.0 655 http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.h 656 tml 657 SUSv2 Commands and Utilities The Single UNIX Specification(SUS) 658 Version 2, Commands and Utilities (XCU), Issue 5 (ISBN: 659 1-85912-191-8, C604) 660 http://www.opengroup.org/publications/catalog/un.htm 661 zlib Manual zlib 1.2 Manual http://www.gzip.org/zlib/ 662 __________________________________________________________ 663 664 Chapter 3. Requirements 665 666 3.1. Relevant Libraries 667 668 The libraries listed in Table 3-1 shall be available on a Linux 669 Standard Base system, with the specified runtime names. The 670 libraries listed in Table 3-2 are architecture specific, but 671 shall be available on all LSB conforming systems. This list may 672 be supplemented or amended by the relevant architecture 673 specific part of ISO/IEC 23360. 674 675 Table 3-1. Standard Library Names 676 Library Runtime Name 677 libdl libdl.so.2 678 libcrypt libcrypt.so.1 679 libz libz.so.1 680 libncurses libncurses.so.5 681 libutil libutil.so.1 682 libpthread libpthread.so.0 683 librt librt.so.1 684 libpam libpam.so.0 685 libgcc_s libgcc_s.so.1 686 687 Table 3-2. Standard Library Names defined in the Architecture 688 Specific Parts of ISO/IEC 23360 689 Library Runtime Name 690 libm See archLSB 691 libc See archLSB 692 proginterp See archLSB 693 694 These libraries will be in an implementation-defined directory 695 which the dynamic linker shall search by default. 696 __________________________________________________________ 697 698 3.2. LSB Implementation Conformance 699 700 A conforming implementation is necessarily architecture 701 specific, and must provide the interfaces specified by both the 702 generic LSB Core specification (ISO/IEC 23360 Part 1) and the 703 relevant architecture specific part of ISO/IEC 23360. 704 705 Rationale: An implementation must provide at least the 706 interfaces specified in these specifications. It may also 707 provide additional interfaces. 708 709 A conforming implementation shall satisfy the following 710 requirements: 711 712 * A processor architecture represents a family of related 713 processors which may not have identical feature sets. The 714 architecture specific parts of ISO/IEC 23360 that 715 supplement this specification for a given target processor 716 architecture describe a minimum acceptable processor. The 717 implementation shall provide all features of this 718 processor, whether in hardware or through emulation 719 transparent to the application. 720 * The implementation shall be capable of executing compiled 721 applications having the format and using the system 722 interfaces described in this document. 723 * The implementation shall provide libraries containing the 724 interfaces specified by this document, and shall provide a 725 dynamic linking mechanism that allows these interfaces to 726 be attached to applications at runtime. All the interfaces 727 shall behave as specified in this document. 728 * The map of virtual memory provided by the implementation 729 shall conform to the requirements of this document. 730 * The implementation's low-level behavior with respect to 731 function call linkage, system traps, signals, and other 732 such activities shall conform to the formats described in 733 this document. 734 * The implementation shall provide all of the mandatory 735 interfaces in their entirety. 736 * The implementation may provide one or more of the optional 737 interfaces. Each optional interface that is provided shall 738 be provided in its entirety. The product documentation 739 shall state which optional interfaces are provided. 740 * The implementation shall provide all files and utilities 741 specified as part of this document in the format defined 742 here and in other referenced documents. All commands and 743 utilities shall behave as required by this document. The 744 implementation shall also provide all mandatory components 745 of an application's runtime environment that are included 746 or referenced in this document. 747 * The implementation, when provided with standard data 748 formats and values at a named interface, shall provide the 749 behavior defined for those values and data formats at that 750 interface. However, a conforming implementation may consist 751 of components which are separately packaged and/or sold. 752 For example, a vendor of a conforming implementation might 753 sell the hardware, operating system, and windowing system 754 as separately packaged items. 755 * The implementation may provide additional interfaces with 756 different names. It may also provide additional behavior 757 corresponding to data values outside the standard ranges, 758 for standard named interfaces. 759 __________________________________________________________ 760 761 3.3. LSB Application Conformance 762 763 A conforming application is necessarily architecture specific, 764 and must conform to both the generic LSB Core specification 765 (ISO/IEC 23360 Part 1)and the relevant architecture specific 766 part of ISO/IEC 23360. 767 768 A conforming application shall satisfy the following 769 requirements: 770 771 * Its executable files shall be either shell scripts or 772 object files in the format defined for the Object File 773 Format system interface. 774 * Its object files shall participate in dynamic linking as 775 defined in the Program Loading and Linking System 776 interface. 777 * It shall employ only the instructions, traps, and other 778 low-level facilities defined in the Low-Level System 779 interface as being for use by applications. 780 * If it requires any optional interface defined in this 781 document in order to be installed or to execute 782 successfully, the requirement for that optional interface 783 shall be stated in the application's documentation. 784 * It shall not use any interface or data format that is not 785 required to be provided by a conforming implementation, 786 unless: 787 + If such an interface or data format is supplied by 788 another application through direct invocation of that 789 application during execution, that application shall 790 be in turn an LSB conforming application. 791 + The use of that interface or data format, as well as 792 its source, shall be identified in the documentation 793 of the application. 794 * It shall not use any values for a named interface that are 795 reserved for vendor extensions. 796 797 A strictly conforming application shall not require or use any 798 interface, facility, or implementation-defined extension that 799 is not defined in this document in order to be installed or to 800 execute successfully. 801 __________________________________________________________ 802 803 Chapter 4. Definitions 804 805 For the purposes of this document, the following definitions, 806 as specified in the ISO/IEC Directives, Part 2, 2001, 4th 807 Edition, apply: 808 809 can 810 811 be able to; there is a possibility of; it is possible to 812 cannot 813 814 be unable to; there is no possibilty of; it is not possible to 815 may 816 817 is permitted; is allowed; is permissible 818 need not 819 820 it is not required that; no...is required 821 shall 822 823 is to; is required to; it is required that; has to; only...is 824 permitted; it is necessary 825 shall not 826 827 is not allowed [permitted] [acceptable] [permissible]; is 828 required to be not; is required that...be not; is not to be 829 should 830 831 it is recommended that; ought to 832 should not 833 834 it is not recommended that; ought not to 835 __________________________________________________________ 836 837 Chapter 5. Terminology 838 839 For the purposes of this document, the following terms apply: 840 841 archLSB 842 The architectural part of the LSB Specification which 843 describes the specific parts of the interface that are 844 platform specific. The archLSB is complementary to the 845 gLSB. 846 847 Binary Standard 848 The total set of interfaces that are available to be 849 used in the compiled binary code of a conforming 850 application. 851 852 gLSB 853 The common part of the LSB Specification that describes 854 those parts of the interface that remain constant across 855 all hardware implementations of the LSB. 856 857 implementation-defined 858 Describes a value or behavior that is not defined by 859 this document but is selected by an implementor. The 860 value or behavior may vary among implementations that 861 conform to this document. An application should not rely 862 on the existence of the value or behavior. An 863 application that relies on such a value or behavior 864 cannot be assured to be portable across conforming 865 implementations. The implementor shall document such a 866 value or behavior so that it can be used correctly by an 867 application. 868 869 Shell Script 870 A file that is read by an interpreter (e.g., awk). The 871 first line of the shell script includes a reference to 872 its interpreter binary. 873 874 Source Standard 875 The set of interfaces that are available to be used in 876 the source code of a conforming application. 877 878 undefined 879 Describes the nature of a value or behavior not defined 880 by this document which results from use of an invalid 881 program construct or invalid data input. The value or 882 behavior may vary among implementations that conform to 883 this document. An application should not rely on the 884 existence or validity of the value or behavior. An 885 application that relies on any particular value or 886 behavior cannot be assured to be portable across 887 conforming implementations. 888 889 unspecified 890 Describes the nature of a value or behavior not 891 specified by this document which results from use of a 892 valid program construct or valid data input. The value 893 or behavior may vary among implementations that conform 894 to this document. An application should not rely on the 895 existence or validity of the value or behavior. An 896 application that relies on any particular value or 897 behavior cannot be assured to be portable across 898 conforming implementations. 899 900 Other terms and definitions used in this document shall have 901 the same meaning as defined in Chapter 3 of the Base 902 Definitions volume of ISO POSIX (2003). 903 __________________________________________________________ 904 905 Chapter 6. Documentation Conventions 906 907 Throughout this document, the following typographic conventions 908 are used: 909 910 function() 911 912 the name of a function 913 command 914 915 the name of a command or utility 916 CONSTANT 917 918 a constant value 919 parameter 920 921 a parameter 922 variable 923 924 a variable 925 926 Throughout this specification, several tables of interfaces are 927 presented. Each entry in these tables has the following format: 928 929 name 930 931 the name of the interface 932 (symver) 933 934 An optional symbol version identifier, if required. 935 [refno] 936 937 A reference number indexing the table of referenced 938 specifications that follows this table. 939 940 For example, 941 942 forkpty(GLIBC_2.0) [SUSv3] 943 944 refers to the interface named forkpty() with symbol version 945 GLIBC_2.0 that is defined in the SUSv3 reference. 946 947 Note: Symbol versions are defined in the architecture 948 specific parts of ISO/IEC 23360 only. 949 __________________________________________________________ 950 951 Chapter 7. Relationship To ISO/IEC 9945 POSIX 952 953 This specification includes many interfaces described in ISO 954 POSIX (2003). Unless otherwise specified, such interfaces 955 should behave exactly as described in that specification. Any 956 conflict between the requirements described here and the ISO 957 POSIX (2003) standard is unintentional, except as explicitly 958 noted otherwise. 959 960 Note: In addition to the differences noted inline in this 961 specification, PDTR 24715 has extracted the differences 962 between this specification and ISO POSIX (2003) into a 963 single place. It is the long term plan of the Linux 964 Foundation to converge the LSB Core Specification with 965 ISO/IEC 9945 POSIX. 966 967 The LSB Specification Authority is responsible for deciding the 968 meaning of conformance to normative referenced standards in the 969 LSB context. Problem Reports regarding underlying or referenced 970 standards in any other context will be referred to the relevant 971 maintenance body for that standard. 972 __________________________________________________________ 973 974 Chapter 8. Relationship To Other Linux Foundation Specifications 975 976 The LSB is the base for several other specification projects 977 under the umbrella of the Linux Foundation (LF). This 978 specification is the foundation, and other specifications build 979 on the interfaces defined here. However, beyond those 980 specifications listed as Normative References, this 981 specification has no dependencies on other LF projects. 982 983 II. Executable And Linking Format (ELF) 984 985 Table of Contents 986 9. Introduction 987 10. Low Level System Information 988 989 10.1. Operating System Interface 990 10.2. Machine Interface 991 992 10.2.1. Data Representation 993 994 11. Object Format 995 996 11.1. Object Files 997 11.2. Sections 998 999 11.2.1. Introduction 1000 11.2.2. Sections Types 1001 1002 11.3. Special Sections 1003 1004 11.3.1. Special Sections 1005 1006 11.4. Symbol Mapping 1007 1008 11.4.1. Introduction 1009 1010 11.5. DWARF Extensions 1011 1012 11.5.1. DWARF Exception Header Encoding 1013 11.5.2. DWARF CFI Extensions 1014 1015 11.6. Exception Frames 1016 1017 11.6.1. The .eh_frame section 1018 11.6.2. The .eh_frame_hdr section 1019 1020 11.7. Symbol Versioning 1021 1022 11.7.1. Introduction 1023 11.7.2. Symbol Version Table 1024 11.7.3. Version Definitions 1025 11.7.4. Version Requirements 1026 11.7.5. Startup Sequence 1027 11.7.6. Symbol Resolution 1028 1029 11.8. ABI note tag 1030 1031 12. Dynamic Linking 1032 1033 12.1. Program Loading and Dynamic Linking 1034 12.2. Program Header 1035 12.3. Dynamic Entries 1036 1037 12.3.1. Introduction 1038 12.3.2. Dynamic Entries 1039 __________________________________________________________ 1040 1041 Chapter 9. Introduction 1042 1043 Executable and Linking Format (ELF) defines the object format 1044 for compiled applications. This specification supplements the 1045 information found in System V ABI Update and is intended to 1046 document additions made since the publication of that document. 1047 __________________________________________________________ 1048 1049 Chapter 10. Low Level System Information 1050 1051 10.1. Operating System Interface 1052 1053 LSB-conforming applications shall assume that stack, heap and 1054 other allocated memory regions will be non-executable. The 1055 application must take steps to make them executable if needed. 1056 __________________________________________________________ 1057 1058 10.2. Machine Interface 1059 1060 10.2.1. Data Representation 1061 1062 LSB-conforming applications shall use the data representation 1063 as defined in the Arcitecture specific ELF documents. 1064 __________________________________________________________ 1065 1066 10.2.1.1. Fundamental Types 1067 1068 In addition to the fundamental types specified in the relevant 1069 architecture specific part of ISO/IEC 23360, a 1 byte data type 1070 is defined here. 1071 1072 Table 10-1. Scalar Types 1073 Type C C++ sizeof Alignment (bytes) Architecture Representation 1074 Integral _Bool bool 1 1 byte 1075 __________________________________________________________ 1076 1077 Chapter 11. Object Format 1078 1079 11.1. Object Files 1080 1081 LSB-conforming implementations shall support the object file 1082 Executable and Linking Format (ELF), which is defined by the 1083 following documents: 1084 1085 * System V ABI 1086 * System V ABI Update 1087 * this specification 1088 * the relevant architecture specific part of ISO/IEC 23360 1089 1090 Conforming implementations may also support other unspecified 1091 object file formats. 1092 __________________________________________________________ 1093 1094 11.2. Sections 1095 1096 11.2.1. Introduction 1097 1098 As described in System V ABI, an ELF object file contains a 1099 number of sections. 1100 __________________________________________________________ 1101 1102 11.2.2. Sections Types 1103 1104 The section header table is an array of Elf32_Shdr or 1105 Elf64_Shdr structures as described in System V ABI. The sh_type 1106 member shall be either a value from Table 11-1, drawn from the 1107 System V ABI, or one of the additional values specified in 1108 Table 11-2. 1109 1110 A section header's sh_type member specifies the sections's 1111 semantics. 1112 __________________________________________________________ 1113 1114 11.2.2.1. ELF Section Types 1115 1116 The following section types are defined in the System V ABI and 1117 the System V ABI Update. 1118 1119 Table 11-1. ELF Section Types 1120 Name Value Description 1121 SHT_DYNAMIC 0x6 The section holds information for dynamic 1122 linking. Currently, an object file shall have only one dynamic 1123 section, but this restriction may be relaxed in the future. See 1124 `Dynamic Section' in Chapter 5 of System V ABI Update for 1125 details. 1126 SHT_DYNSYM 0xb This section holds a minimal set of symbols 1127 adequate for dynamic linking. See also SHT_SYMTAB. Currently, 1128 an object file may have either a section of SHT_SYMTAB type or 1129 a section of SHT_DYNSYM type, but not both. This restriction 1130 may be relaxed in the future. 1131 SHT_FINI_ARRAY 0xf This section contains an array of pointers 1132 to termination functions, as described in `Initialization and 1133 Termination Functions' in Chapter 5 of System V ABI Update. 1134 Each pointer in the array is taken as a parameterless procedure 1135 with a void return. 1136 SHT_HASH 0x5 The section holds a symbol hash table. Currently, 1137 an object file shall have only one hash table, but this 1138 restriction may be relaxed in the future. See `Hash Table' in 1139 Chapter 5 of System V ABI Update for details. 1140 SHT_INIT_ARRAY 0xe This section contains an array of pointers 1141 to initialization functions, as described in `Initialization 1142 and Termination Functions' in Chapter 5 of System V ABI Update. 1143 Each pointer in the array is taken as a parameterless procedure 1144 with a void return. 1145 SHT_NOBITS 0x8 A section of this type occupies no space in the 1146 file but otherwise resembles SHT_PROGBITS. Although this 1147 section contains no bytes, the sh_offset member contains the 1148 conceptual file offset. 1149 SHT_NOTE 0x7 The section holds information that marks the file 1150 in some way. See `Note Section' in Chapter 5 of System V ABI 1151 Update for details. 1152 SHT_NULL 0x0 This value marks the section header as inactive; 1153 it does not have an associated section. Other members of the 1154 section header have undefined values. 1155 SHT_PREINIT_ARRAY 0x10 This section contains an array of 1156 pointers to functions that are invoked before all other 1157 initialization functions, as described in `Initialization and 1158 Termination Functions' in Chapter 5 of System V ABI Update. 1159 Each pointer in the array is taken as a parameterless proceure 1160 with a void return. 1161 SHT_PROGBITS 0x1 The section holds information defined by the 1162 program, whose format and meaning are determined solely by the 1163 program. 1164 SHT_REL 0x9 The section holds relocation entries without 1165 explicit addends, such as type Elf32_Rel for the 32-bit class 1166 of object files or type Elf64_Rel for the 64-bit class of 1167 object files. An object file may have multiple relocation 1168 sections. See `Relocation' in Chapter 4 of System V ABI Update 1169 for details. 1170 SHT_RELA 0x4 The section holds relocation entries with explicit 1171 addends, such as type Elf32_Rela for the 32-bit class of object 1172 files or type Elf64_Rela for the 64-bit class of object files. 1173 An object file may have multiple relocation sections. See 1174 `Relocation' in Chapter 4 of System V ABI Update for details. 1175 SHT_STRTAB 0x3 The section holds a string table. An object file 1176 may have multiple string table sections. See `String Table' in 1177 Chapter 4 of System V ABI Update for details. 1178 SHT_SYMTAB 0x2 This section holds a symbol table. Currently, an 1179 object file may have either a section of SHT_SYMTAB type or a 1180 section of SHT_DYNSYM type, but not both. This restriction may 1181 be relaxed in the future. Typically, SHT_SYMTAB provides 1182 symbols for link editing, though it may also be used for 1183 dynamic linking. As a complete symbol table, it may contain 1184 many symbols unnecessary for dynamic linking. 1185 __________________________________________________________ 1186 1187 11.2.2.2. Additional Section Types 1188 1189 The following additional section types are defined here. 1190 1191 Table 11-2. Additional Section Types 1192 Name Value Description 1193 SHT_GNU_verdef 0x6ffffffd This section contains the symbol 1194 versions that are provided. 1195 SHT_GNU_verneed 0x6ffffffe This section contains the symbol 1196 versions that are required. 1197 SHT_GNU_versym 0x6fffffff This section contains the Symbol 1198 Version Table. 1199 __________________________________________________________ 1200 1201 11.3. Special Sections 1202 1203 11.3.1. Special Sections 1204 1205 Various sections hold program and control information. Sections 1206 in the lists below are used by the system and have the 1207 indicated types and attributes. 1208 __________________________________________________________ 1209 1210 11.3.1.1. ELF Special Sections 1211 1212 The following sections are defined in the System V ABI and the 1213 System V ABI Update. 1214 1215 Table 11-3. ELF Special Sections 1216 Name Type Attributes 1217 .bss SHT_NOBITS SHF_ALLOC+SHF_WRITE 1218 .comment SHT_PROGBITS 0 1219 .data SHT_PROGBITS SHF_ALLOC+SHF_WRITE 1220 .data1 SHT_PROGBITS SHF_ALLOC+SHF_WRITE 1221 .debug SHT_PROGBITS 0 1222 .dynamic SHT_DYNAMIC SHF_ALLOC+SHF_WRITE 1223 .dynstr SHT_STRTAB SHF_ALLOC 1224 .dynsym SHT_DYNSYM SHF_ALLOC 1225 .fini SHT_PROGBITS SHF_ALLOC+SHF_EXECINSTR 1226 .fini_array SHT_FINI_ARRAY SHF_ALLOC+SHF_WRITE 1227 .hash SHT_HASH SHF_ALLOC 1228 .init SHT_PROGBITS SHF_ALLOC+SHF_EXECINSTR 1229 .init_array SHT_INIT_ARRAY SHF_ALLOC+SHF_WRITE 1230 .interp SHT_PROGBITS SHF_ALLOC 1231 .line SHT_PROGBITS 0 1232 .note SHT_NOTE 0 1233 .preinit_array SHT_PREINIT_ARRAY SHF_ALLOC+SHF_WRITE 1234 .rodata SHT_PROGBITS SHF_ALLOC+SHF_MERGE+SHF_STRINGS 1235 .rodata1 SHT_PROGBITS SHF_ALLOC+SHF_MERGE+SHF_STRINGS 1236 .shstrtab SHT_STRTAB 0 1237 .strtab SHT_STRTAB SHF_ALLOC 1238 .symtab SHT_SYMTAB SHF_ALLOC 1239 .tbss SHT_NOBITS SHF_ALLOC+SHF_WRITE+SHF_TLS 1240 .tdata SHT_PROGBITS SHF_ALLOC+SHF_WRITE+SHF_TLS 1241 .text SHT_PROGBITS SHF_ALLOC+SHF_EXECINSTR 1242 1243 .bss 1244 1245 This section holds data that contributes to the program's 1246 memory image. The program may treat this data as uninitialized. 1247 However, the system shall initialize this data with zeroes when 1248 the program begins to run. The section occupies no file space, 1249 as indicated by the section type, SHT_NOBITS. 1250 .comment 1251 1252 This section holds version control information. 1253 .data 1254 1255 This section holds initialized data that contribute to the 1256 program's memory image. 1257 .data1 1258 1259 This section holds initialized data that contribute to the 1260 program's memory image. 1261 .debug 1262 1263 This section holds information for symbolic debugging. The 1264 contents are unspecified. All section names with the prefix 1265 .debug hold information for symbolic debugging. The contents of 1266 these sections are unspecified. 1267 .dynamic 1268 1269 This section holds dynamic linking information. The section's 1270 attributes will include the SHF_ALLOC bit. Whether the 1271 SHF_WRITE bit is set is processor specific. See Chapter 5 of 1272 System V ABI Update for more information. 1273 .dynstr 1274 1275 This section holds strings needed for dynamic linking, most 1276 commonly the strings that represent the names associated with 1277 symbol table entries. See Chapter 5 of System V ABI Update for 1278 more information. 1279 .dynsym 1280 1281 This section holds the dynamic linking symbol table, as 1282 described in `Symbol Table' of System V ABI Update. 1283 .fini 1284 1285 This section holds executable instructions that contribute to 1286 the process termination code. That is, when a program exits 1287 normally, the system arranges to execute the code in this 1288 section. 1289 .fini_array 1290 1291 This section holds an array of function pointers that 1292 contributes to a single termination array for the executable or 1293 shared object containing the section. 1294 .hash 1295 1296 This section holds a symbol hash table. See `Hash Table' in 1297 Chapter 5 of System V ABI Update for more information. 1298 .init 1299 1300 This section holds executable instructions that contribute to 1301 the process initialization code. When a program starts to run, 1302 the system arranges to execute the code in this section before 1303 calling the main program entry point (called main for C 1304 programs). 1305 .init_array 1306 1307 This section holds an array of function pointers that 1308 contributes to a single initialization array for the executable 1309 or shared object containing the section. 1310 .interp 1311 1312 This section holds the path name of a program interpreter. If 1313 the file has a loadable segment that includes relocation, the 1314 sections' attributes will include the SHF_ALLOC bit; otherwise, 1315 that bit will be off. See Chapter 5 of System V ABI Update for 1316 more information. 1317 .line 1318 1319 This section holds line number information for symbolic 1320 debugging, which describes the correspondence between the 1321 source program and the machine code. The contents are 1322 unspecified. 1323 .note 1324 1325 This section holds information in the format that `Note 1326 Section' in Chapter 5 of System V ABI Update describes. 1327 .preinit_array 1328 1329 This section holds an array of function pointers that 1330 contributes to a single pre-initialization array for the 1331 executable or shared object containing the section. 1332 .rodata 1333 1334 This section holds read-only data that typically contribute to 1335 a non-writable segment in the process image. See `Program 1336 Header' in Chapter 5 of System V ABI Update for more 1337 information. 1338 .rodata1 1339 1340 This section holds read-only data that typically contribute to 1341 a non-writable segment in the process image. See `Program 1342 Header' in Chapter 5 of System V ABI Update for more 1343 information. 1344 .shstrtab 1345 1346 This section holds section names. 1347 .strtab 1348 1349 This section holds strings, most commonly the strings that 1350 represent the names associated with symbol table entries. If 1351 the file has a loadable segment that includes the symbol string 1352 table, the section's attributes will include the SHF_ALLOC bit; 1353 otherwise, that bit will be off. 1354 .symtab 1355 1356 This section holds a symbol table, as `Symbol Table' in Chapter 1357 4 of System V ABI Update describes. If the file has a loadable 1358 segment that includes the symbol table, the section's 1359 attributes will include the SHF_ALLOC bit; otherwise, that bit 1360 will be off. 1361 .tbss 1362 1363 This section holds uninitialized thread-local data that 1364 contribute to the program's memory image. By definition, the 1365 system initializes the data with zeros when the data is 1366 instantiated for each new execution flow. The section occupies 1367 no file space, as indicated by the section type, SHT_NOBITS. 1368 Implementations need not support thread-local storage. 1369 .tdata 1370 1371 This section holds initialized thread-local data that 1372 contributes to the program's memory image. A copy of its 1373 contents is instantiated by the system for each new execution 1374 flow. Implementations need not support thread-local storage. 1375 .text 1376 1377 This section holds the `text', or executable instructions, of a 1378 program. 1379 __________________________________________________________ 1380 1381 11.3.1.2. Additional Special Sections 1382 1383 Object files in an LSB conforming application may also contain 1384 one or more of the additional special sections described below. 1385 1386 Table 11-4. Additional Special Sections 1387 Name Type Attributes 1388 .ctors SHT_PROGBITS SHF_ALLOC+SHF_WRITE 1389 .data.rel.ro SHT_PROGBITS SHF_ALLOC+SHF_WRITE 1390 .dtors SHT_PROGBITS SHF_ALLOC+SHF_WRITE 1391 .eh_frame SHT_PROGBITS SHF_ALLOC 1392 .eh_frame_hdr SHT_PROGBITS SHF_ALLOC 1393 .gcc_except_table SHT_PROGBITS SHF_ALLOC 1394 .gnu.version SHT_GNU_versym SHF_ALLOC 1395 .gnu.version_d SHT_GNU_verdef SHF_ALLOC 1396 .gnu.version_r SHT_GNU_verneed SHF_ALLOC 1397 .got.plt SHT_PROGBITS SHF_ALLOC+SHF_WRITE 1398 .jcr SHT_PROGBITS SHF_ALLOC+SHF_WRITE 1399 .note.ABI-tag SHT_NOTE SHF_ALLOC 1400 .stab SHT_PROGBITS 0 1401 .stabstr SHT_STRTAB 0 1402 1403 .ctors 1404 1405 This section contains a list of global constructor function 1406 pointers. 1407 .data.rel.ro 1408 1409 This section holds initialized data that contribute to the 1410 program's memory image. This section may be made read-only 1411 after relocations have been applied. 1412 .dtors 1413 1414 This section contains a list of global destructor function 1415 pointers. 1416 .eh_frame 1417 1418 This section contains information necessary for frame unwinding 1419 during exception handling. See Section 11.6.1. 1420 .eh_frame_hdr 1421 1422 This section contains a pointer to the .eh_frame section which 1423 is accessible to the runtime support code of a C++ application. 1424 This section may also contain a binary search table which may 1425 be used by the runtime support code to more efficiently access 1426 records in the .eh_frame section. See Section 11.6.2. 1427 .gcc_except_table 1428 1429 This section holds Language Specific Data. 1430 .gnu.version 1431 1432 This section contains the Symbol Version Table. See Section 1433 11.7.2. 1434 .gnu.version_d 1435 1436 This section contains the Version Definitions. See Section 1437 11.7.3. 1438 .gnu.version_r 1439 1440 This section contains the Version Requirements. See Section 1441 11.7.4. 1442 .got.plt 1443 1444 This section holds the read-only portion of the GLobal Offset 1445 Table. This section may be made read-only after relocations 1446 have been applied. 1447 .jcr 1448 1449 This section contains information necessary for registering 1450 compiled Java classes. The contents are compiler-specific and 1451 used by compiler initialization functions. 1452 .note.ABI-tag 1453 1454 Specify ABI details. See Section 11.8. 1455 .stab 1456 1457 This section contains debugging information. The contents are 1458 not specified as part of the LSB. 1459 .stabstr 1460 1461 This section contains strings associated with the debugging 1462 infomation contained in the .stab section. 1463 __________________________________________________________ 1464 1465 11.4. Symbol Mapping 1466 1467 11.4.1. Introduction 1468 1469 Symbols in a source program are translated by the compilation 1470 system into symbols that exist in the object file. 1471 __________________________________________________________ 1472 1473 11.4.1.1. C Language 1474 1475 External C symbols shall be unchanged in an object file's 1476 symbol table. 1477 __________________________________________________________ 1478 1479 11.5. DWARF Extensions 1480 1481 The LSB does not specify debugging information, however, some 1482 additional sections contain information which is encoded using 1483 the the encoding as specified by DWARF Debugging Information 1484 Format, Revision 2.0.0 with extensions defined here. 1485 1486 Note: The extensions specified here also exist in DWARF 1487 Debugging Information Format, Revision 3.0.0 (Draft). It is 1488 expected that future versions of the LSB will reference the 1489 final version of that document, and that the definitions 1490 here will be taken from that document instead of being 1491 specified here. 1492 __________________________________________________________ 1493 1494 11.5.1. DWARF Exception Header Encoding 1495 1496 The DWARF Exception Header Encoding is used to describe the 1497 type of data used in the .eh_frame and .eh_frame_hdr section. 1498 The upper 4 bits indicate how the value is to be applied. The 1499 lower 4 bits indicate the format of the data. 1500 1501 Table 11-5. DWARF Exception Header value format 1502 Name Value Meaning 1503 DW_EH_PE_absptr 0x00 The Value is a literal pointer whose size 1504 is determined by the architecture. 1505 DW_EH_PE_uleb128 0x01 Unsigned value is encoded using the 1506 Little Endian Base 128 (LEB128) as defined by DWARF Debugging 1507 Information Format, Revision 2.0.0. 1508 DW_EH_PE_udata2 0x02 A 2 bytes unsigned value. 1509 DW_EH_PE_udata4 0x03 A 4 bytes unsigned value. 1510 DW_EH_PE_udata8 0x04 An 8 bytes unsigned value. 1511 DW_EH_PE_sleb128 0x09 Signed value is encoded using the Little 1512 Endian Base 128 (LEB128) as defined by DWARF Debugging 1513 Information Format, Revision 2.0.0. 1514 DW_EH_PE_sdata2 0x0A A 2 bytes signed value. 1515 DW_EH_PE_sdata4 0x0B A 4 bytes signed value. 1516 DW_EH_PE_sdata8 0x0C An 8 bytes signed value. 1517 1518 Table 11-6. DWARF Exception Header application 1519 Name Value Meaning 1520 DW_EH_PE_pcrel 0x10 Value is relative to the current program 1521 counter. 1522 DW_EH_PE_textrel 0x20 Value is relative to the beginning of the 1523 .text section. 1524 DW_EH_PE_datarel 0x30 Value is relative to the beginning of the 1525 .got or .eh_frame_hdr section. 1526 DW_EH_PE_funcrel 0x40 Value is relative to the beginning of the 1527 function. 1528 DW_EH_PE_aligned 0x50 Value is aligned to an address unit sized 1529 boundary. 1530 1531 One special encoding, 0xff (DW_EH_PE_omit), shall be used to 1532 indicate that no value ispresent. 1533 __________________________________________________________ 1534 1535 11.5.2. DWARF CFI Extensions 1536 1537 In addition to the Call Frame Instructions defined in section 1538 6.4.2 of DWARF Debugging Information Format, Revision 2.0.0, 1539 the following additional Call Frame Instructions may also be 1540 used. 1541 1542 Table 11-7. Additional DWARF Call Frame Instructions 1543 Name Value Meaning 1544 DW_CFA_expression 0x10 The DW_CFA_expression instruction takes 1545 two operands: an unsigned LEB128 value representing a register 1546 number, and a DW_FORM_block value representing a DWARF 1547 expression. The required action is to establish the DWARF 1548 expression as the means by which the address in which the given 1549 register contents are found may be computed. The value of the 1550 CFA is pushed on the DWARF evaluation stack prior to execution 1551 of the DWARF expression. The DW_OP_call2, DW_OP_call4, 1552 DW_OP_call_ref and DW_OP_push_object_address DWARF operators 1553 (see Section 2.4.1 of DWARF Debugging Information Format, 1554 Revision 2.0.0) cannot be used in such a DWARF expression. 1555 DW_CFA_offset_extended_sf 0x11 The DW_CFA_offset_extended_sf 1556 instruction takes two operands: an unsigned LEB128 value 1557 representing a register number and a signed LEB128 factored 1558 offset. This instruction is identical to DW_CFA_offset_extended 1559 except that the second operand is signed. 1560 DW_CFA_def_cfa_sf 0x12 The DW_CFA_def_cfa_sf instruction takes 1561 two operands: an unsigned LEB128 value representing a register 1562 number and a signed LEB128 factored offset. This instruction is 1563 identical to DW_CFA_def_cfa except that the second operand is 1564 signed and factored. 1565 DW_CFA_def_cfa_offset_sf 0x13 The DW_CFA_def_cfa_offset_sf 1566 instruction takes a signed LEB128 operand representing a 1567 factored offset. This instruction is identical to 1568 DW_CFA_def_cfa_offset except that the operand is signed and 1569 factored. 1570 DW_CFA_GNU_args_size 0x2e The DW_CFA_GNU_args_size instruction 1571 takes an unsigned LEB128 operand representing an argument size. 1572 This instruction specifies the total of the size of the 1573 arguments which have been pushed onto the stack. 1574 DW_CFA_GNU_negative_offset_extended 0x2f The DW_CFA_def_cfa_sf 1575 instruction takes two operands: an unsigned LEB128 value 1576 representing a register number and an unsigned LEB128 which 1577 represents the magnitude of the offset. This instruction is 1578 identical to DW_CFA_offset_extended_sf except that the operand 1579 is subtracted to produce the offset. This instructions is 1580 obsoleted by DW_CFA_offset_extended_sf. 1581 __________________________________________________________ 1582 1583 11.6. Exception Frames 1584 1585 When using languages that support exceptions, such as C++, 1586 additional information must be provided to the runtime 1587 environment that describes the call frames that must be unwound 1588 during the processing of an exception. This information is 1589 contained in the special sections .eh_frame and .eh_framehdr. 1590 1591 Note: The format of the .eh_frame section is similar in 1592 format and purpose to the .debug_frame section which is 1593 specified in DWARF Debugging Information Format, Revision 1594 3.0.0 (Draft). Readers are advised that there are some 1595 subtle difference, and care should be taken when comparing 1596 the two sections. 1597 __________________________________________________________ 1598 1599 11.6.1. The .eh_frame section 1600 1601 The .eh_frame section shall contain 1 or more Call Frame 1602 Information (CFI) records. The number of records present shall 1603 be determined by size of the section as contained in the 1604 section header. Each CFI record contains a Common Information 1605 Entry (CIE) record followed by 1 or more Frame Description 1606 Entry (FDE) records. Both CIEs and FDEs shall be aligned to an 1607 addressing unit sized boundary. 1608 1609 Table 11-8. Call Frame Information Format 1610 Common Information Entry Record 1611 Frame Description Entry Record(s) 1612 __________________________________________________________ 1613 1614 11.6.1.1. The Common Information Entry Format 1615 1616 Table 11-9. Common Information Entry Format 1617 Length Required 1618 Extended Length Optional 1619 CIE ID Required 1620 Version Required 1621 Augmentation String Required 1622 Code Alignment Factor Required 1623 Data Alignment Factor Required 1624 Return Address Register Required 1625 Augmentation Data Length Optional 1626 Augmentation Data Optional 1627 Initial Instructions Required 1628 Padding 1629 1630 Length 1631 A 4 byte unsigned value indicating the length in bytes 1632 of the CIE structure, not including the Length field 1633 itself. If Length contains the value 0xffffffff, then 1634 the length is contained in the Extended Length field. If 1635 Length contains the value 0, then this CIE shall be 1636 considered a terminator and processing shall end. 1637 1638 Extended Length 1639 A 8 byte unsigned value indicating the length in bytes 1640 of the CIE structure, not including the Length and 1641 Extended Length fields. 1642 1643 CIE ID 1644 A 4 byte unsigned value that is used to distinguish CIE 1645 records from FDE records. This value shall always be 0, 1646 which indicates this record is a CIE. 1647 1648 Version 1649 A 1 byte value that identifies the version number of the 1650 frame information structure. This value shall be 1. 1651 1652 Augmentation String 1653 This value is a NUL terminated string that identifies 1654 the augmentation to the CIE or to the FDEs associated 1655 with this CIE. A zero length string indicates that no 1656 augmentation data is present. The augmentation string is 1657 case sensitive and shall be interpreted as described 1658 below. 1659 1660 Code Alignment Factor 1661 An unsigned LEB128 encoded value that is factored out of 1662 all advance location instructions that are associated 1663 with this CIE or its FDEs. This value shall be 1664 multiplied by the delta argument of an adavance location 1665 instruction to obtain the new location value. 1666 1667 Data Alignment Factor 1668 A signed LEB128 encoded value that is factored out of 1669 all offset instructions that are associated with this 1670 CIE or its FDEs. This value shall be multiplied by the 1671 register offset argument of an offset instruction to 1672 obtain the new offset value. 1673 1674 Augmentation Length 1675 An unsigned LEB128 encoded value indicating the length 1676 in bytes of the Augmentation Data. This field is only 1677 present if the Augmentation String contains the 1678 character 'z'. 1679 1680 Augmentation Data 1681 A block of data whose contents are defined by the 1682 contents of the Augmentation String as described below. 1683 This field is only present if the Augmentation String 1684 contains the character 'z'. The size of this data is 1685 given by the Augentation Length. 1686 1687 Initial Instructions 1688 Initial set of Call Frame Instructions. The number of 1689 instructions is determined by the remaining space in the 1690 CIE record. 1691 1692 Padding 1693 Extra bytes to align the CIE structure to an addressing 1694 unit size boundary. 1695 __________________________________________________________ 1696 1697 11.6.1.1.1. Augmentation String Format 1698 1699 The Agumentation String indicates the presence of some optional 1700 fields, and how those fields should be intepreted. This string 1701 is case sensitive. Each character in the augmentation string in 1702 the CIE can be interpreted as below: 1703 1704 'z' 1705 1706 A 'z' may be present as the first character of the string. If 1707 present, the Augmentation Data field shall be present. The 1708 contents of the Augmentation Data shall be intepreted according 1709 to other characters in the Augmentation String. 1710 'L' 1711 1712 A 'L' may be present at any position after the first character 1713 of the string. This character may only be present if 'z' is the 1714 first character of the string. If present, it indicates the 1715 presence of one argument in the Augmentation Data of the CIE, 1716 and a corresponding argument in the Augmentation Data of the 1717 FDE. The argument in the Augmentation Data of the CIE is 1-byte 1718 and represents the pointer encoding used for the argument in 1719 the Augmentation Data of the FDE, which is the address of a 1720 language-specific data area (LSDA). The size of the LSDA 1721 pointer is specified by the pointer encoding used. 1722 'P' 1723 1724 A 'P' may be present at any position after the first character 1725 of the string. This character may only be present if 'z' is the 1726 first character of the string. If present, it indicates the 1727 presence of two arguments in the Augmentation Data of the CIE. 1728 The first argument is 1-byte and represents the pointer 1729 encoding used for the second argument, which is the address of 1730 a personality routine handler. The personality routine is used 1731 to handle language and vendor-specific tasks. The system unwind 1732 library interface accesses the language-specific exception 1733 handling semantics via the pointer to the personality routine. 1734 The personality routine does not have an ABI-specific name. The 1735 size of the personality routine pointer is specified by the 1736 pointer encoding used. 1737 'R' 1738 1739 A 'R' may be present at any position after the first character 1740 of the string. This character may only be present if 'z' is the 1741 first character of the string. If present, The Augmentation 1742 Data shall include a 1 byte argument that represents the 1743 pointer encoding for the address pointers used in the FDE. 1744 __________________________________________________________ 1745 1746 11.6.1.2. The Frame Description Entry Format 1747 1748 Table 11-10. Frame Description Entry Format 1749 Length Required 1750 Extended Length Optional 1751 CIE Pointer Required 1752 PC Begin Required 1753 PC Range Required 1754 Augmentation Data Length Optional 1755 Augmentation Data Optional 1756 Call Frame Instructions Required 1757 Padding 1758 1759 Length 1760 A 4 byte unsigned value indicating the length in bytes 1761 of the CIE structure, not including the Length field 1762 itself. If Length contains the value 0xffffffff, then 1763 the length is contained the Extended Length field. If 1764 Length contains the value 0, then this CIE shall be 1765 considered a terminator and processing shall end. 1766 1767 Extended Length 1768 A 8 byte unsigned value indicating the length in bytes 1769 of the CIE structure, not including the Length field 1770 itself. 1771 1772 CIE Pointer 1773 A 4 byte unsigned value that when subtracted from the 1774 offset of the the CIE Pointer in the current FDE yields 1775 the offset of the start of the associated CIE. This 1776 value shall never be 0. 1777 1778 PC Begin 1779 An encoded value that indicates the address of the 1780 initial location associated with this FDE. The encoding 1781 format is specified in the Augmentation Data. 1782 1783 PC Range 1784 An absolute value that indicates the number of bytes of 1785 instructions associated with this FDE. 1786 1787 Augmentation Length 1788 An unsigned LEB128 encoded value indicating the length 1789 in bytes of the Augmentation Data. This field is only 1790 present if the Augmentation String in the associated CIE 1791 contains the character 'z'. 1792 1793 Augmentation Data 1794 A block of data whose contents are defined by the 1795 contents of the Augmentation String in the associated 1796 CIE as described above. This field is only present if 1797 the Augmentation String in the associated CIE contains 1798 the character 'z'. The size of this data is given by the 1799 Augentation Length. 1800 1801 Call Frame Instructions 1802 A set of Call Frame Instructions. 1803 1804 Padding 1805 Extra bytes to align the FDE structure to an addressing 1806 unit size boundary. 1807 __________________________________________________________ 1808 1809 11.6.2. The .eh_frame_hdr section 1810 1811 The .eh_frame_hdr section contains additional information about 1812 the .eh_frame section. A pointer to the start of the .eh_frame 1813 data, and optionally, a binary search table of pointers to the 1814 .eh_frame records are found in this section. 1815 1816 Data in this section is encoded according to Section 11.5.1. 1817 1818 Table 11-11. .eh_frame_hdr Section Format 1819 Encoding Field 1820 unsigned byte version 1821 unsigned byte eh_frame_ptr_enc 1822 unsigned byte fde_count_enc 1823 unsigned byte table_enc 1824 encoded eh_frame_ptr 1825 encoded fde_count 1826 binary search table 1827 1828 version 1829 1830 Version of the .eh_frame_hdr format. This value shall be 1. 1831 eh_frame_ptr_enc 1832 1833 The encoding format of the eh_frame_ptr field. 1834 fde_count_enc 1835 1836 The encoding format of the fde_count field. A value of 1837 DW_EH_PE_omit indicates the binary search table is not present. 1838 table_enc 1839 1840 The encoding format of the entries in the binary search table. 1841 A value of DW_EH_PE_omit indicates the binary search table is 1842 not present. 1843 eh_frame_ptr 1844 1845 The encoded value of the pointer to the start of the .eh_frame 1846 section. 1847 fde_count 1848 1849 The encoded value of the count of entries in the binary search 1850 table. 1851 binary search table 1852 1853 A binary search table containing fde_count entries. Each entry 1854 of the table consist of two encoded values, the initial 1855 location, and the address. The entries are sorted in an 1856 increasing order by the initial location value. 1857 __________________________________________________________ 1858 1859 11.7. Symbol Versioning 1860 1861 11.7.1. Introduction 1862 1863 This chapter describes the Symbol Versioning mechanism. All ELF 1864 objects may provide or depend on versioned symbols. Symbol 1865 Versioning is implemented by 3 section types: SHT_GNU_versym, 1866 SHT_GNU_verdef, and SHT_GNU_verneed. 1867 1868 The prefix Elfxx in the following descriptions and code 1869 fragments stands for either "Elf32" or "Elf64", depending on 1870 the architecture. 1871 1872 Versions are described by strings. The structures that are used 1873 for symbol versions also contain a member that holds the ELF 1874 hashing values of the strings. This allows for more efficient 1875 processing. 1876 __________________________________________________________ 1877 1878 11.7.2. Symbol Version Table 1879 1880 The special section .gnu.version which has a section type of 1881 SHT_GNU_versym shall contain the Symbol Version Table. This 1882 section shall have the same number of entries as the Dynamic 1883 Symbol Table in the .dynsym section. 1884 1885 The .gnu.version section shall contain an array of elements of 1886 type Elfxx_Half. Each entry specifies the version defined for 1887 or required by the corresponding symbol in the Dynamic Symbol 1888 Table. 1889 1890 The values in the Symbol Version Table are specific to the 1891 object in which they are located. These values are identifiers 1892 that are provided by the the vna_other member of the 1893 Elfxx_Vernaux structure or the vd_ndx member of the 1894 Elfxx_Verdef structure. 1895 1896 The values 0 and 1 are reserved. 1897 1898 0 1899 1900 The symbol is local, not available outside the object. 1901 1 1902 1903 The symbol is defined in this object and is globally available. 1904 1905 All other values are used to identify version strings located 1906 in one of the other Symbol Version sections. The value itself 1907 is not the version associated with the symbol. The string 1908 identified by the value defines the version of the symbol. 1909 __________________________________________________________ 1910 1911 11.7.3. Version Definitions 1912 1913 The special section .gnu.version_d which has a section type of 1914 SHT_GNU_verdef shall contain symbol version definitions. The 1915 number of entries in this section shall be contained in the 1916 DT_VERDEFNUM entry of the Dynamic Section .dynamic. The sh_link 1917 member of the section header (see figure 4-8 in the System V 1918 ABI) shall point to the section that contains the strings 1919 referenced by this section. 1920 1921 The section shall contain an array of Elfxx_Verdef structures, 1922 as described in Figure 11-1, optionally followed by an array of 1923 Elfxx_Verdaux structures, as defined in Figure 11-2. 1924 typedef struct { 1925 Elfxx_Half vd_version; 1926 Elfxx_Half vd_flags; 1927 Elfxx_Half vd_ndx; 1928 Elfxx_Half vd_cnt; 1929 Elfxx_Word vd_hash; 1930 Elfxx_Word vd_aux; 1931 Elfxx_Word vd_next; 1932 } Elfxx_Verdef; 1933 1934 Figure 11-1. Version Definition Entries 1935 1936 vd_version 1937 1938 Version revision. This field shall be set to 1. 1939 vd_flags 1940 1941 Version information flag bitmask. 1942 vd_ndx 1943 1944 Version index numeric value referencing the SHT_GNU_versym 1945 section. 1946 vd_cnt 1947 1948 Number of associated verdaux array entries. 1949 vd_hash 1950 1951 Version name hash value (ELF hash function). 1952 vd_aux 1953 1954 Offset in bytes to a corresponding entry in an array of 1955 Elfxx_Verdaux structures as defined in Figure 11-2 1956 vd_next 1957 1958 Offset to the next verdef entry, in bytes. 1959 typedef struct { 1960 Elfxx_Word vda_name; 1961 Elfxx_Word vda_next; 1962 } Elfxx_Verdaux; 1963 1964 Figure 11-2. Version Definition Auxiliary Entries 1965 1966 vda_name 1967 1968 Offset to the version or dependency name string in the section 1969 header, in bytes. 1970 vda_next 1971 1972 Offset to the next verdaux entry, in bytes. 1973 __________________________________________________________ 1974 1975 11.7.4. Version Requirements 1976 1977 The special section .gnu.version_r which has a section type of 1978 SHT_GNU_verneed shall contain required symbol version 1979 definitions. The number of entries in this section shall be 1980 contained in the DT_VERNEEDNUM entry of the Dynamic Section 1981 .dynamic. The sh_link member of the section header (see figure 1982 4-8 in System V ABI) shall point to the section that contains 1983 the strings referenced by this section. 1984 1985 The section shall contain an array of Elfxx_Verneed structures, 1986 as described in Figure 11-3, optionally followed by an array of 1987 Elfxx_Vernaux structures, as defined in Figure 11-4. 1988 typedef struct { 1989 Elfxx_Half vn_version; 1990 Elfxx_Half vn_cnt; 1991 Elfxx_Word vn_file; 1992 Elfxx_Word vn_aux; 1993 Elfxx_Word vn_next; 1994 } Elfxx_Verneed; 1995 1996 Figure 11-3. Version Needed Entries 1997 1998 vn_version 1999 2000 Version of structure. This value is currently set to 1, and 2001 will be reset if the versioning implementation is incompatibly 2002 altered. 2003 vn_cnt 2004 2005 Number of associated verneed array entries. 2006 vn_file 2007 2008 Offset to the file name string in the section header, in bytes. 2009 vn_aux 2010 2011 Offset to a corresponding entry in the vernaux array, in bytes. 2012 vn_next 2013 2014 Offset to the next verneed entry, in bytes. 2015 typedef struct { 2016 Elfxx_Word vna_hash; 2017 Elfxx_Half vna_flags; 2018 Elfxx_Half vna_other; 2019 Elfxx_Word vna_name; 2020 Elfxx_Word vna_next; 2021 } Elfxx_Vernaux; 2022 2023 Figure 11-4. Version Needed Auxiliary Entries 2024 2025 vna_hash 2026 2027 Dependency name hash value (ELF hash function). 2028 vna_flags 2029 2030 Dependency information flag bitmask. 2031 vna_other 2032 2033 Object file version identifier used in the .gnu.version symbol 2034 version array. Bit number 15 controls whether or not the object 2035 is hidden; if this bit is set, the object cannot be used and 2036 the static linker will ignore the symbol's presence in the 2037 object. 2038 vna_name 2039 2040 Offset to the dependency name string in the section header, in 2041 bytes. 2042 vna_next 2043 2044 Offset to the next vernaux entry, in bytes. 2045 __________________________________________________________ 2046 2047 11.7.5. Startup Sequence 2048 2049 When loading a sharable object the system shall analyze version 2050 definition data from the loaded object to assure that it meets 2051 the version requirements of the calling object. This step is 2052 referred to as definition testing. The dynamic loader shall 2053 retrieve the entries in the caller's Elfxx_Verneed array and 2054 attempt to find matching definition information in the loaded 2055 Elfxx_Verdef table. 2056 2057 Each object and dependency shall be tested in turn. If a symbol 2058 definition is missing and the vna_flags bit for VER_FLG_WEAK is 2059 not set, the loader shall return an error and exit. If the 2060 vna_flags bit for VER_FLG_WEAK is set in the Elfxx_Vernaux 2061 entry, and the loader shall issue a warning and continue 2062 operation. 2063 2064 When the versions referenced by undefined symbols in the loaded 2065 object are found, version availability is certified. The test 2066 completes without error and the object shall be made available. 2067 __________________________________________________________ 2068 2069 11.7.6. Symbol Resolution 2070 2071 When symbol versioning is used in an object, relocations extend 2072 definition testing beyond the simple match of symbol name 2073 strings: the version of the reference shall also equal the name 2074 of the definition. 2075 2076 The same index that is used in the symbol table can be 2077 referenced in the SHT_GNU_versym section, and the value of this 2078 index is then used to acquire name data. The corresponding 2079 requirement string is retrieved from the Elfxx_Verneed array, 2080 and likewise, the corresponding definition string from the 2081 Elfxx_Verdef table. 2082 2083 If the high order bit (bit number 15) of the version symbolis 2084 set, the object cannot be used and the static linker shall 2085 ignore the symbol's presence in the object. 2086 2087 When an object with a reference and an object with the 2088 definition are being linked, the following rules shall govern 2089 the result: 2090 2091 * The object with the reference and the object with the 2092 definitions both use versioning. All described matching is 2093 processed in this case. A fatal error shall be triggered 2094 when no matching definition can be found in the object 2095 whose name is the one referenced by the vn_name element in 2096 the Elfxx_Verneed entry. 2097 * The object with the reference does not use versioning, 2098 while the object with the definitions does. In this 2099 instance, only the definitions with index numbers 1 and 2 2100 will be used in the reference match, the same identified by 2101 the static linker as the base definition. In cases where 2102 the static linker was not used, such as in calls to 2103 dlopen(), a version that does not have the base definition 2104 index shall be acceptable if it is the only version for 2105 which the symbol is defined. 2106 * The object with the reference uses versioning, but the 2107 object with the definitions specifies none. A matching 2108 symbol shall be accepted in this case. A fatal error shall 2109 be triggered if a corruption in the required symbols list 2110 obscures an outdated object file and causes a match on the 2111 object filename in the Elfxx_Verneed entry. 2112 * Neither the object with the reference nor the object with 2113 the definitions use versioning. The behavior in this 2114 instance shall default to pre-existing symbol rules. 2115 __________________________________________________________ 2116 2117 11.8. ABI note tag 2118 2119 Every executable shall contain a section named .note.ABI-tag of 2120 type SHT_NOTE. This section is structured as a note section as 2121 documented in the ELF spec. The section shall contain at least 2122 the following entry. The name field (namesz/name) contains the 2123 string "GNU". The type field shall be 1. The descsz field shall 2124 be at least 16, and the first 16 bytes of the desc field shall 2125 be as follows. 2126 2127 The first 32-bit word of the desc field shall be 0 (this 2128 signifies a Linux executable). The second, third, and fourth 2129 32-bit words of the desc field contain the earliest compatible 2130 kernel version. For example, if the 3 words are 2, 2, and 5, 2131 this signifies a 2.2.5 kernel. 2132 __________________________________________________________ 2133 2134 Chapter 12. Dynamic Linking 2135 2136 12.1. Program Loading and Dynamic Linking 2137 2138 LSB-conforming implementations shall support the object file 2139 information and system actions that create running programs as 2140 specified in the System V ABI and System V ABI Update and as 2141 further required by this specification and the relevant 2142 architecture specific part of ISO/IEC 23360. 2143 2144 Any shared object that is loaded shall contain sufficient 2145 DT_NEEDED records to satisfy the symbols on the shared library. 2146 __________________________________________________________ 2147 2148 12.2. Program Header 2149 2150 In addition to the Segment Types defined in the System V ABI 2151 and System V ABI Update the following Segment Types shall also 2152 be supported. 2153 2154 Table 12-1. Linux Segment Types 2155 Name Value 2156 PT_GNU_EH_FRAME 0x6474e550 2157 PT_GNU_STACK 0x6474e551 2158 PT_GNU_RELRO 0x6474e552 2159 2160 PT_GNU_EH_FRAME 2161 2162 The array element specifies the location and size of the 2163 exception handling information as defined by the .eh_frame_hdr 2164 section. 2165 PT_GNU_STACK 2166 2167 The p_flags member specifies the permissions on the segment 2168 containing the stack and is used to indicate wether the stack 2169 should be executable. The absense of this header indicates that 2170 the stack will be executable. 2171 PT_GNU_RELRO 2172 2173 the array element specifies the location and size of a segment 2174 which may be made read-only after relocations have been 2175 processed. 2176 __________________________________________________________ 2177 2178 12.3. Dynamic Entries 2179 2180 12.3.1. Introduction 2181 2182 As described in System V ABI, if an object file participates in 2183 dynamic linking, its program header table shall have an element 2184 of type PT_DYNAMIC. This `segment' contains the .dynamic 2185 section. A special symbol, _DYNAMIC, labels the section, which 2186 contains an array of the following structures. 2187 typedef struct { 2188 Elf32_Sword d_tag; 2189 union { 2190 Elf32_Word d_val; 2191 Elf32_Addr d_ptr; 2192 } d_un; 2193 } Elf32_Dyn; 2194 2195 extern Elf32_Dyn _DYNAMIC[]; 2196 2197 typedef struct { 2198 Elf64_Sxword d_tag; 2199 union { 2200 Elf64_Xword d_val; 2201 Elf64_Addr d_ptr; 2202 } d_un; 2203 } Elf64_Dyn; 2204 2205 extern Elf64_Dyn _DYNAMIC[]; 2206 2207 Figure 12-1. Dynamic Structure 2208 2209 For each object with this type, d_tag controls the 2210 interpretation of d_un. 2211 __________________________________________________________ 2212 2213 12.3.2. Dynamic Entries 2214 __________________________________________________________ 2215 2216 12.3.2.1. ELF Dynamic Entries 2217 2218 The following dynamic entries are defined in the System V ABI 2219 and System V ABI Update. 2220 2221 DT_BIND_NOW 2222 2223 Process relocations of object 2224 DT_DEBUG 2225 2226 For debugging; unspecified 2227 DT_FINI 2228 2229 Address of termination function 2230 DT_HASH 2231 2232 Address of symbol hash table 2233 DT_HIPROC 2234 2235 End of processor-specific 2236 DT_INIT 2237 2238 Address of init function 2239 DT_JMPREL 2240 2241 Address of PLT relocs 2242 DT_LOPROC 2243 2244 Start of processor-specific 2245 DT_NEEDED 2246 2247 Name of needed library 2248 DT_NULL 2249 2250 Marks end of dynamic section 2251 DT_PLTREL 2252 2253 Type of reloc in PLT 2254 DT_PLTRELSZ 2255 2256 Size in bytes of PLT relocs 2257 DT_REL 2258 2259 Address of Rel relocs 2260 DT_RELA 2261 2262 Address of Rela relocs 2263 DT_RELAENT 2264 2265 Size of one Rela reloc 2266 DT_RELASZ 2267 2268 Total size of Rela relocs 2269 DT_RELENT 2270 2271 Size of one Rel reloc 2272 DT_RELSZ 2273 2274 Total size of Rel relocs 2275 DT_RPATH 2276 2277 Library search path 2278 DT_SONAME 2279 2280 Name of shared object 2281 DT_STRSZ 2282 2283 Size of string table 2284 DT_STRTAB 2285 2286 Address of string table 2287 DT_SYMBOLIC 2288 2289 Start symbol search here 2290 DT_SYMENT 2291 2292 Size of one symbol table entry 2293 DT_SYMTAB 2294 2295 Address of symbol table 2296 DT_TEXTREL 2297 2298 Reloc might modify .text 2299 __________________________________________________________ 2300 2301 12.3.2.2. Additional Dynamic Entries 2302 2303 An LSB conforming object may also use the following additional 2304 Dynamic Entry types. 2305 2306 DT_ADDRRNGHI 2307 2308 Values from DT_ADDRRNGLO through DT_ADDRRNGHI are reserved for 2309 definition by an archLSB. 2310 DT_ADDRRNGLO 2311 2312 Values from DT_ADDRRNGLO through DT_ADDRRNGHI are reserved for 2313 definition by an archLSB. 2314 DT_AUXILIARY 2315 2316 Shared object to load before self 2317 DT_FILTER 2318 2319 Shared object to get values from 2320 DT_FINI_ARRAY 2321 2322 The address of an array of pointers to termination functions. 2323 DT_FINI_ARRAYSZ 2324 2325 Size in bytes of DT_FINI_ARRAY 2326 DT_HIOS 2327 2328 Values from DT_LOOS through DT_HIOS are reserved for definition 2329 by specific operating systems. 2330 DT_INIT_ARRAY 2331 2332 The address of an array of pointers to initialization 2333 functions. 2334 DT_INIT_ARRAYSZ 2335 2336 Size in bytes of DT_INIT_ARRAY 2337 DT_LOOS 2338 2339 Values from DT_LOOS through DT_HIOS are reserved for definition 2340 by specific operating systems. 2341 DT_NUM 2342 2343 Number of dynamic entry tags defined (excepting reserved 2344 ranges). 2345 DT_POSFLAG_1 2346 2347 Flags for DT_* entries, effecting the following DT_* entry 2348 DT_RELCOUNT 2349 2350 All Elf32_Rel R_*_RELATIVE relocations have been placed into a 2351 single block and this entry specifies the number of entries in 2352 that block. This permits ld.so.1 to streamline the processing 2353 of RELATIVE relocations. 2354 DT_RUNPATH 2355 2356 null-terminated library search path string 2357 DT_SYMINENT 2358 2359 Entry size of syminfo 2360 DT_SYMINFO 2361 2362 Address of the Syminfo table. 2363 DT_SYMINSZ 2364 2365 Size of syminfo table (in bytes) 2366 DT_VALRNGHI 2367 2368 Entries which fall between DT_VALRNGHI & DT_VALRNGLO use the 2369 Dyn.d_un.d_val field of the Elf*_Dyn structure. 2370 DT_VALRNGLO 2371 2372 Entries which fall between DT_VALRNGHI & DT_VALRNGLO use the 2373 Dyn.d_un.d_val field of the Elf*_Dyn structure. 2374 DT_VERDEF 2375 2376 Address of version definition table 2377 DT_VERDEFNUM 2378 2379 Number of version definitions 2380 DT_VERNEED 2381 2382 Address of table with needed versions 2383 DT_VERNEEDNUM 2384 2385 Number of needed versions 2386 DT_VERSYM 2387 2388 Address of the table provided by the .gnu.version section. 2389 2390 III. Base Libraries 2391 2392 Table of Contents 2393 13. Base Libraries 2394 2395 13.1. Introduction 2396 13.2. Program Interpreter 2397 13.3. Interfaces for libc 2398 2399 13.3.1. RPC 2400 13.3.2. System Calls 2401 13.3.3. Standard I/O 2402 13.3.4. Signal Handling 2403 13.3.5. Localization Functions 2404 13.3.6. Posix Spawn Option 2405 13.3.7. Posix Advisory Option 2406 13.3.8. Socket Interface 2407 13.3.9. Wide Characters 2408 13.3.10. String Functions 2409 13.3.11. IPC Functions 2410 13.3.12. Regular Expressions 2411 13.3.13. Character Type Functions 2412 13.3.14. Time Manipulation 2413 13.3.15. Terminal Interface Functions 2414 13.3.16. System Database Interface 2415 13.3.17. Language Support 2416 13.3.18. Large File Support 2417 13.3.19. Standard Library 2418 2419 13.4. Data Definitions for libc 2420 2421 13.4.1. arpa/inet.h 2422 13.4.2. assert.h 2423 13.4.3. ctype.h 2424 13.4.4. dirent.h 2425 13.4.5. err.h 2426 13.4.6. errno.h 2427 13.4.7. fcntl.h 2428 13.4.8. fmtmsg.h 2429 13.4.9. fnmatch.h 2430 13.4.10. ftw.h 2431 13.4.11. getopt.h 2432 13.4.12. glob.h 2433 13.4.13. grp.h 2434 13.4.14. iconv.h 2435 13.4.15. inttypes.h 2436 13.4.16. langinfo.h 2437 13.4.17. libgen.h 2438 13.4.18. libintl.h 2439 13.4.19. limits.h 2440 13.4.20. locale.h 2441 13.4.21. monetary.h 2442 13.4.22. net/if.h 2443 13.4.23. netdb.h 2444 13.4.24. netinet/in.h 2445 13.4.25. netinet/ip.h 2446 13.4.26. netinet/tcp.h 2447 13.4.27. netinet/udp.h 2448 13.4.28. nl_types.h 2449 13.4.29. poll.h 2450 13.4.30. pty.h 2451 13.4.31. pwd.h 2452 13.4.32. regex.h 2453 13.4.33. rpc/auth.h 2454 13.4.34. rpc/clnt.h 2455 13.4.35. rpc/pmap_clnt.h 2456 13.4.36. rpc/rpc_msg.h 2457 13.4.37. rpc/svc.h 2458 13.4.38. rpc/types.h 2459 13.4.39. rpc/xdr.h 2460 13.4.40. sched.h 2461 13.4.41. search.h 2462 13.4.42. setjmp.h 2463 13.4.43. signal.h 2464 13.4.44. spawn.h 2465 13.4.45. stddef.h 2466 13.4.46. stdint.h 2467 13.4.47. stdio.h 2468 13.4.48. stdlib.h 2469 13.4.49. string.h 2470 13.4.50. strings.h 2471 13.4.51. sys/file.h 2472 13.4.52. sys/ioctl.h 2473 13.4.53. sys/ipc.h 2474 13.4.54. sys/mman.h 2475 13.4.55. sys/msg.h 2476 13.4.56. sys/param.h 2477 13.4.57. sys/poll.h 2478 13.4.58. sys/resource.h 2479 13.4.59. sys/select.h 2480 13.4.60. sys/sem.h 2481 13.4.61. sys/shm.h 2482 13.4.62. sys/socket.h 2483 13.4.63. sys/stat.h 2484 13.4.64. sys/statfs.h 2485 13.4.65. sys/statvfs.h 2486 13.4.66. sys/time.h 2487 13.4.67. sys/timeb.h 2488 13.4.68. sys/times.h 2489 13.4.69. sys/types.h 2490 13.4.70. sys/uio.h 2491 13.4.71. sys/un.h 2492 13.4.72. sys/utsname.h 2493 13.4.73. sys/wait.h 2494 13.4.74. syslog.h 2495 13.4.75. termios.h 2496 13.4.76. time.h 2497 13.4.77. ucontext.h 2498 13.4.78. ulimit.h 2499 13.4.79. unistd.h 2500 13.4.80. utime.h 2501 13.4.81. utmp.h 2502 13.4.82. utmpx.h 2503 13.4.83. wchar.h 2504 13.4.84. wctype.h 2505 13.4.85. wordexp.h 2506 2507 13.5. Interface Definitions for libc 2508 2509 _IO_feof -- alias for feof 2510 _IO_getc -- alias for getc 2511 _IO_putc -- alias for putc 2512 _IO_puts -- alias for puts 2513 __assert_fail -- abort the program after false 2514 assertion 2515 2516 __ctype_b_loc -- accessor function for __ctype_b 2517 array for ctype functions 2518 2519 __ctype_get_mb_cur_max -- maximum length of a 2520 multibyte character in the current locale 2521 2522 __ctype_tolower_loc -- accessor function for 2523 __ctype_b_tolower array for ctype tolower() 2524 function 2525 2526 __ctype_toupper_loc -- accessor function for 2527 __ctype_b_toupper() array for ctype 2528 toupper() function 2529 2530 __cxa_atexit -- register a function to be called by 2531 exit or when a shared library is unloaded 2532 2533 __cxa_finalize -- call destructors of global (or 2534 local static) C++ objects and exit functions 2535 registered with atexit 2536 2537 __daylight -- daylight savings time flag 2538 __environ -- alias for environ - user environment 2539 __errno_location -- address of errno variable 2540 __fpending -- returns in bytes the amount of output 2541 pending on a stream 2542 2543 __getpagesize -- alias for getpagesize - get current 2544 page size 2545 2546 __getpgid -- get the process group id 2547 __h_errno_location -- address of h_errno variable 2548 __isinf -- test for infinity 2549 __isinff -- test for infinity 2550 __isinfl -- test for infinity 2551 __isnan -- test for infinity 2552 __isnanf -- test for infinity 2553 __isnanl -- test for infinity 2554 __libc_current_sigrtmax -- return number of 2555 available real-time signal with lowest 2556 priority 2557 2558 __libc_current_sigrtmin -- return number of 2559 available real-time signal with highest 2560 priority 2561 2562 __libc_start_main -- initialization routine 2563 __lxstat -- inline wrapper around call to lxstat 2564 __mempcpy -- copy given number of bytes of source to 2565 destination 2566 2567 __rawmemchr -- scan memory 2568 __register_atfork -- alias for register_atfork 2569 __sigsetjmp -- save stack context for non-local goto 2570 __stpcpy -- alias for stpcpy 2571 __strdup -- alias for strdup 2572 __strtod_internal -- underlying function for strtod 2573 __strtof_internal -- underlying function for strtof 2574 __strtok_r -- alias for strtok_r 2575 __strtol_internal -- alias for strtol 2576 __strtold_internal -- underlying function for 2577 strtold 2578 2579 __strtoll_internal -- underlying function for 2580 strtoll 2581 2582 __strtoul_internal -- underlying function for 2583 strtoul 2584 2585 __strtoull_internal -- underlying function for 2586 strtoull 2587 2588 __sysconf -- get configuration information at 2589 runtime 2590 2591 __sysv_signal -- signal handling 2592 __timezone -- global variable containing timezone 2593 __tzname -- global variable containing the timezone 2594 __wcstod_internal -- underlying function for wcstod 2595 __wcstof_internal -- underlying function for wcstof 2596 __wcstol_internal -- underlying function for wcstol 2597 __wcstold_internal -- underlying function for 2598 wcstold 2599 2600 __wcstoul_internal -- underlying function for 2601 wcstoul 2602 2603 __xmknod -- make block or character special file 2604 __xpg_basename -- return the last component of a 2605 file name 2606 2607 __xpg_sigpause -- remove a signal from the signal 2608 mask and suspend the thread 2609 2610 __xpg_strerror_r -- return string describing error 2611 number 2612 2613 __xstat -- get File Status 2614 __xstat64 -- get File Status 2615 _environ -- alias for environ - user environment 2616 _nl_msg_cat_cntr -- new catalog load counter 2617 _sys_errlist -- array containing the "C" locale 2618 strings used by strerror() 2619 2620 _sys_siglist -- array containing the names of the 2621 signal names 2622 2623 acct -- switch process accounting on or off 2624 adjtime -- correct the time to allow synchronization 2625 of the system clock 2626 2627 asprintf -- write formatted output to a dynamically 2628 allocated string 2629 2630 basename -- return the last component of a file name 2631 bind_textdomain_codeset -- specify encoding for 2632 message retrieval 2633 2634 bindresvport -- bind socket to privileged IP port 2635 bindtextdomain -- specify the location of a message 2636 catalog 2637 2638 cfmakeraw -- get and set terminal attributes 2639 cfsetspeed -- set terminal input and output data 2640 rate 2641 2642 daemon -- run in the background 2643 dcgettext -- perform domain and category specific 2644 lookup in message catalog 2645 2646 dcngettext -- perform domain and category specific 2647 lookup in message catalog with plural 2648 2649 dgettext -- perform lookup in message catalog for 2650 the current LC_MESSAGES locale 2651 2652 dngettext -- perform lookup in message catalog for 2653 the current locale 2654 2655 duplocale -- provide new handle for selection of 2656 locale 2657 2658 endutent -- access utmp file entries 2659 err -- display formatted error messages 2660 error -- print error message 2661 errx -- display formatted error message and exit 2662 fcntl -- file control 2663 fflush_unlocked -- non thread safe fflush 2664 fgetwc_unlocked -- non thread safe fgetwc 2665 flock -- apply or remove an advisory lock on an open 2666 file 2667 2668 freelocale -- free a locale object 2669 fscanf -- convert formatted input 2670 fstatfs -- (deprecated) 2671 fstatfs64 -- (deprecated) 2672 fwscanf -- convert formatted input 2673 getdomainname -- get NIS domain name (DEPRECATED). 2674 getdtablesize -- get file descriptor table size 2675 (DEPRECATED) 2676 2677 getgrouplist -- get groups a user belongs to 2678 gethostbyaddr_r -- find network host database entry 2679 matching host name (DEPRECATED) 2680 2681 gethostbyname2 -- find network host database entry 2682 matching host name (DEPRECATED) 2683 2684 gethostbyname2_r -- find network host database entry 2685 matching host name (DEPRECATED) 2686 2687 gethostbyname_r -- find network host database entry 2688 matching host name (DEPRECATED) 2689 2690 getloadavg -- get system load averages 2691 getopt -- parse command line options 2692 getopt_long -- parse command line options 2693 getopt_long_only -- parse command line options 2694 getpagesize -- get memory page size (DEPRECATED) 2695 getsockopt -- get socket options 2696 gettext -- search message catalogs for a string 2697 getutent -- access user accounting database entries 2698 getutent_r -- access user accounting database 2699 entries 2700 2701 glob64 -- find pathnames matching a pattern (Large 2702 File Support) 2703 2704 globfree64 -- free memory from glob64() (Large File 2705 Support) 2706 2707 inet_aton -- Internet address manipulation routine 2708 initgroups -- initialize the supplementary group 2709 access list 2710 2711 ioctl -- control device 2712 sockio -- socket ioctl commands 2713 ttyio -- tty ioctl commands 2714 kill -- send a signal 2715 link -- create a link to a file 2716 mbsnrtowcs -- convert a multibyte string to a wide 2717 character string 2718 2719 memmem -- locate bytes 2720 memrchr -- scan memory for a character 2721 mremap -- remap a virtual memory address 2722 newlocale -- allocate a locale object 2723 ngettext -- search message catalogs for plural 2724 string 2725 2726 pmap_getport -- find the port number assigned to a 2727 service registered with a portmapper. 2728 2729 pmap_set -- establishes mapping to machine's RPC 2730 Bind service. 2731 2732 pmap_unset -- destroys RPC Binding 2733 posix_fadvise64 -- File advisory information (Large 2734 File Support) 2735 2736 posix_fallocate64 -- file space control (Large File 2737 Support) 2738 2739 psignal -- print signal message 2740 readdir64_r -- read a directory (Large File Support) 2741 regexec -- regular expression matching 2742 scanf -- convert formatted input 2743 sched_setscheduler -- set scheduling policy and 2744 parameters 2745 2746 setbuffer -- stream buffering operation 2747 setgroups -- set list of supplementary group IDs 2748 sethostname -- set host name 2749 setsockopt -- set socket options 2750 setutent -- access user accounting database entries 2751 sigandset -- build a new signal set by combining the 2752 two input sets using logical AND 2753 2754 sigisemptyset -- check for empty signal set 2755 sigorset -- build a new signal set by combining the 2756 two input sets using logical OR 2757 2758 sigpause -- remove a signal from the signal mask and 2759 suspend the thread (deprecated) 2760 2761 sigreturn -- return from signal handler and cleanup 2762 stack frame 2763 2764 sscanf -- convert formatted input 2765 statfs -- (deprecated) 2766 statfs64 -- (deprecated) 2767 stime -- set time 2768 stpcpy -- copy a string returning a pointer to its 2769 end 2770 2771 stpncpy -- copy a fixed-size string, returning a 2772 pointer to its end 2773 2774 strcasestr -- locate a substring ignoring case 2775 strerror_r -- return string describing error number 2776 strndup -- return a malloc'd copy of at most the 2777 specified number of bytes of a string 2778 2779 strnlen -- determine the length of a fixed-size 2780 string 2781 2782 strptime -- parse a time string 2783 strsep -- extract token from string 2784 strsignal -- return string describing signal 2785 strtoq -- convert string value to a long or quad_t 2786 integer 2787 2788 strtouq -- convert a string to an unsigned long long 2789 svc_register -- register Remote Procedure Call 2790 interface 2791 2792 svc_run -- waits for RPC requests to arrive and 2793 calls service procedure 2794 2795 svc_sendreply -- called by RPC service's dispatch 2796 routine 2797 2798 svctcp_create -- create a TCP/IP-based RPC service 2799 transport 2800 2801 svcudp_create -- create a UDP-based RPC service 2802 transport 2803 2804 swscanf -- convert formatted input 2805 sysconf -- Get configuration information at runtime 2806 system -- execute a shell command 2807 textdomain -- set the current default message domain 2808 unlink -- remove a directory entry 2809 uselocale -- set locale for thread 2810 utmpname -- set user accounting database 2811 vasprintf -- write formatted output to a dynamically 2812 allocated string 2813 2814 vdprintf -- write formatted output to a file 2815 descriptor 2816 2817 verrx -- display formatted error message and exit 2818 vfscanf -- convert formatted input 2819 vfwscanf -- convert formatted input 2820 vscanf -- convert formatted input 2821 vsscanf -- convert formatted input 2822 vswscanf -- convert formatted input 2823 vsyslog -- log to system log 2824 vwscanf -- convert formatted input 2825 wait4 -- wait for process termination, BSD style 2826 waitpid -- wait for child process 2827 warn -- formatted error messages 2828 warnx -- formatted error messages 2829 wcpcpy -- copy a wide character string, returning a 2830 pointer to its end 2831 2832 wcpncpy -- copy a fixed-size string of wide 2833 characters, returning a pointer to its end 2834 2835 wcscasecmp -- compare two wide-character strings, 2836 ignoring case 2837 2838 wcsdup -- duplicate a wide-character string 2839 wcsncasecmp -- compare two fixed-size wide-character 2840 strings, ignoring case 2841 2842 wcsnlen -- determine the length of a fixed-size 2843 wide-character string 2844 2845 wcsnrtombs -- convert a wide character string to a 2846 multi-byte string 2847 2848 wcstoq -- convert wide string to long long int 2849 representation 2850 2851 wcstouq -- convert wide string to unsigned long long 2852 int representation 2853 2854 wscanf -- convert formatted input 2855 xdr_u_int -- library routines for external data 2856 representation 2857 2858 xdrstdio_create -- library routines for external 2859 data representation 2860 2861 13.6. Interfaces for libm 2862 2863 13.6.1. Math 2864 2865 13.7. Data Definitions for libm 2866 2867 13.7.1. complex.h 2868 13.7.2. fenv.h 2869 13.7.3. math.h 2870 2871 13.8. Interface Definitions for libm 2872 2873 __finite -- test for infinity 2874 __finitef -- test for infinity 2875 __finitel -- test for infinity 2876 __fpclassify -- Classify real floating type 2877 __fpclassifyf -- Classify real floating type 2878 __signbit -- test sign of floating point value 2879 __signbitf -- test sign of floating point value 2880 clog10 -- Logarithm of a Complex Number 2881 clog10f -- Logarithm of a Complex Number 2882 clog10l -- Logarithm of a Complex Number 2883 drem -- Floating Point Remainder (DEPRECATED) 2884 dremf -- Floating Point Remainder (DEPRECATED) 2885 dreml -- Floating Point Remainder (DEPRECATED) 2886 exp10 -- Base-10 power function 2887 exp10f -- Base-10 power function 2888 exp10l -- Base-10 power function 2889 fedisableexcept -- disable floating point exceptions 2890 feenableexcept -- enable floating point exceptions 2891 fegetexcept -- query floating point exception 2892 handling state 2893 2894 finite -- test for infinity (DEPRECATED) 2895 finitef -- test for infinity (DEPRECATED) 2896 finitel -- test for infinity (DEPRECATED) 2897 gamma -- log gamma function (DEPRECATED) 2898 gammaf -- log gamma function (DEPRECATED) 2899 gammal -- log gamma function (DEPRECATED) 2900 j0f -- Bessel functions 2901 j0l -- Bessel functions 2902 j1f -- Bessel functions 2903 j1l -- Bessel functions 2904 jnf -- Bessel functions 2905 jnl -- Bessel functions 2906 lgamma_r -- log gamma functions 2907 lgammaf_r -- log gamma functions 2908 lgammal_r -- log gamma functions 2909 pow10 -- Base-10 power function 2910 pow10f -- Base-10 power function 2911 pow10l -- Base-10 power function 2912 significand -- floating point mantissa 2913 significandf -- floating point mantissa 2914 significandl -- floating point mantissa 2915 sincos -- trigonometric functions 2916 sincosf -- trigonometric functions 2917 sincosl -- trigonometric functions 2918 y0f -- Bessel functions 2919 y0l -- Bessel functions 2920 y1f -- Bessel functions 2921 y1l -- Bessel functions 2922 ynf -- Bessel functions 2923 ynl -- Bessel functions 2924 2925 13.9. Interfaces for libpthread 2926 2927 13.9.1. Realtime Threads 2928 13.9.2. Advanced Realtime Threads 2929 13.9.3. Posix Threads 2930 13.9.4. Thread aware versions of libc interfaces 2931 2932 13.10. Data Definitions for libpthread 2933 2934 13.10.1. pthread.h 2935 13.10.2. semaphore.h 2936 2937 13.11. Interface Definitions for libpthread 2938 2939 _pthread_cleanup_pop -- establish cancellation 2940 handlers 2941 2942 _pthread_cleanup_push -- establish cancellation 2943 handlers 2944 2945 13.12. Interfaces for libgcc_s 2946 2947 13.12.1. Unwind Library 2948 2949 13.13. Data Definitions for libgcc_s 2950 2951 13.13.1. unwind.h 2952 2953 13.14. Interfaces for libd