refspecs.linuxfoundation.org · 2015-01-28... _____ 53 54 Table of Contents 55 Foreword 56...

download refspecs.linuxfoundation.org · 2015-01-28... _____ 53 54 Table of Contents 55 Foreword 56 Introduction 57 I . Introductory Elements 58 59 1. Scope 60 61 ... 1380 1381 11.3.1.2. ...

If you can't read please download the document

Transcript of refspecs.linuxfoundation.org · 2015-01-28... _____ 53 54 Table of Contents 55 Foreword 56...

1Linux 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 381Foreword 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 391Introduction 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 451I. 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 477Chapter 1. Scope 478 4791.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 5231.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 536Chapter 2. References 537 5382.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 5972.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 664Chapter 3. Requirements 665 6663.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 6983.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 7613.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 803Chapter 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 837Chapter 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 905Chapter 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 951Chapter 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 974Chapter 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 983II. 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 1041Chapter 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 1049Chapter 10. Low Level System Information 1050 105110.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 105810.2. Machine Interface 1059 106010.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 106610.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 1074Integral _Bool bool 1 1 byte 1075 __________________________________________________________ 1076 1077Chapter 11. Object Format 1078 107911.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 109411.2. Sections 1095 109611.2.1. Introduction 1097 1098 As described in System V ABI, an ELF object file contains a 1099 number of sections. 1100 __________________________________________________________ 1101 110211.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 111411.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 118711.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 120111.3. Special Sections 1202 120311.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 121011.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 138111.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 146511.4. Symbol Mapping 1466 146711.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 147311.4.1.1. C Language 1474 1475 External C symbols shall be unchanged in an object file's 1476 symbol table. 1477 __________________________________________________________ 1478 147911.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 149411.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 153511.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 158311.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 159911.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 161411.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 169711.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 174611.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 180911.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 185911.7. Symbol Versioning 1860 186111.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 187811.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 191111.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. 1924typedef 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. 1959typedef 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 197511.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. 1988typedef 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. 2015typedef 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 204711.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 206911.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 b