
64-bit PowerPC ELF Application Binary Interface Supplement 1.9 Ian Lance Taylor Zembu Labs 64-bit PowerPC ELF Application Binary Interface Supplement 1.9 by Ian Lance Taylor 1.9 Edition Published July 21, 2004 Copyright © 1999, 2004 IBM Corporation Copyright © 2003, 2004 Free Standards Group Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available from http://www.linuxbase.org/spec/refspecs/LSB_1.2.0/gLSB/gfdl.html. The following terms are trademarks or registered trademarks of International Business Machines Corporation in the United States and/or other countires: AIX, PowerPC. A full list U.S. trademarks owned by IBM may be found at http://www.ibm.com/legal/copytrade.shtml. Revision History Revision 1.1 Revised by: David Edelsohn, IBM Research PLT Revision 1.2 Revised by: Torbjorn Granlund, Swox AB dS relocation Revision 1.3 Revised by: David Edelsohn and Mark Mendell, IBM long double Revision 1.4 Revised by: Alan Modra, IBM PLT, quad Revision 1.4.1 Revised by: Kristin Thomas, IBM Docbook formatted Revision 1.5 Revised by: Alan Modra, IBM GOT,PLT relocs, TLS support Revision 1.6 Revised by: Alan Modra, IBM structure passing Revision 1.7 Revised by: Alan Modra, David Edelsohn and Steven Munroe, IBM VMX extensions, function arguments and double alignment Revision 1.8 Revised by: David Edelsohn, Chris Lorenz, IBM single element FP structs and added png graphics Revision 1.9 Revised by: Alan Modra, IBM revise FP and vector params, auxv_t, typo fixes Table of Contents 1. Introduction............................................................................................................................................1 1.1. How to Use the 64-bit PowerPC ELF ABI Supplement .............................................................1 2. Software Installation .............................................................................................................................3 2.1. Physical Distribution Media and Formats...................................................................................3 3. Low Level System Information.............................................................................................................4 3.1. Machine Interface........................................................................................................................4 3.1.1. Processor Architecture....................................................................................................4 3.1.2. Data Representation........................................................................................................4 3.1.3. Byte Ordering .................................................................................................................4 3.1.4. Fundamental Types.........................................................................................................5 3.1.5. Extended Precision .........................................................................................................6 3.1.6. Aggregates and Unions...................................................................................................7 3.1.7. Bit-fields .........................................................................................................................8 3.2. Function Calling Sequence .......................................................................................................11 3.2.1. Registers .......................................................................................................................11 3.2.2. The Stack Frame...........................................................................................................13 3.2.3. Parameter Passing.........................................................................................................15 3.2.4. Return Values................................................................................................................18 3.2.5. Function Descriptors ....................................................................................................19 3.3. Traceback Tables.......................................................................................................................19 3.3.1. Mandatory Fields..........................................................................................................20 3.3.2. Optional Fields .............................................................................................................22 3.4. Process Initialization .................................................................................................................24 3.4.1. Registers .......................................................................................................................24 3.4.2. Process Stack................................................................................................................25 3.5. Coding Examples ......................................................................................................................28 3.5.1. Code Model Overview..................................................................................................28 3.5.2. The TOC section...........................................................................................................29 3.5.3. TOC Assembly Language Syntax ................................................................................30 3.5.4. Function Prologue and Epilogue ..................................................................................31 3.5.5. Register Saving and Restoring Functions.....................................................................32 3.5.6. Saving General Registers Only.....................................................................................33 3.5.7. Saving General Registers and Floating Point Registers ...............................................33 3.5.8. Saving Floating Point Registers Only ..........................................................................34 3.5.9. Save and Restore Services............................................................................................34 3.5.10. Data Objects ...............................................................................................................39 3.5.11. Function Calls.............................................................................................................40 3.5.12. Branching ...................................................................................................................42 3.5.13. Dynamic Stack Space Allocation ...............................................................................43 3.6. DWARF Definition....................................................................................................................46 3.6.1. DWARF Release Number.............................................................................................46 3.6.2. DWARF Register Number Mapping ............................................................................46 iii 4. Object Files...........................................................................................................................................50 4.1. ELF Header ...............................................................................................................................50 4.2. Special Sections ........................................................................................................................50 4.3. TOC...........................................................................................................................................51 4.4. Symbol Table ............................................................................................................................52 4.4.1. Symbol Values..............................................................................................................52 4.5. Relocation .................................................................................................................................52 4.5.1. Relocation Types ..........................................................................................................52 5. Program Loading and Dynamic Linking ..........................................................................................61 5.1. Program Loading.......................................................................................................................61 5.1.1. Program Interpreter ......................................................................................................63 5.2. Dynamic Linking ......................................................................................................................63 5.2.1. Dynamic Section ..........................................................................................................64 5.2.2. Global Offset Table.......................................................................................................64 5.2.3. Function Addresses ......................................................................................................65 5.2.4. Procedure Linkage Table..............................................................................................65 6. Libraries ...............................................................................................................................................69
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages74 Page
-
File Size-