Gdb Internals a Guide to the Internals of the GNU Debugger

Total Page:16

File Type:pdf, Size:1020Kb

Gdb Internals a Guide to the Internals of the GNU Debugger gdb Internals A guide to the internals of the GNU debugger John Gilmore Cygnus Solutions Second Edition: Stan Shebs Cygnus Solutions Cygnus Solutions Revision TEXinfo 2007-09-03.05 Copyright c 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents Scope of this Document :::::::::::::::::::::::::::: 1 1 Summary :::::::::::::::::::::::::::::::::::::::: 1 1.1 Requirements :::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Contributors ::::::::::::::::::::::::::::::::::::::::::::::::::: 1 2 Overall Structure ::::::::::::::::::::::::::::::: 2 2.1 The Symbol Side ::::::::::::::::::::::::::::::::::::::::::::::: 2 2.2 The Target Side :::::::::::::::::::::::::::::::::::::::::::::::: 2 2.3 Configurations ::::::::::::::::::::::::::::::::::::::::::::::::: 2 2.4 Source Tree Structure :::::::::::::::::::::::::::::::::::::::::: 3 3 Algorithms :::::::::::::::::::::::::::::::::::::: 4 3.1 Prologue Analysis :::::::::::::::::::::::::::::::::::::::::::::: 4 3.2 Breakpoint Handling ::::::::::::::::::::::::::::::::::::::::::: 6 3.3 Single Stepping :::::::::::::::::::::::::::::::::::::::::::::::: 7 3.4 Signal Handling :::::::::::::::::::::::::::::::::::::::::::::::: 7 3.5 Thread Handling ::::::::::::::::::::::::::::::::::::::::::::::: 7 3.6 Inferior Function Calls ::::::::::::::::::::::::::::::::::::::::: 7 3.7 Longjmp Support :::::::::::::::::::::::::::::::::::::::::::::: 7 3.8 Watchpoints ::::::::::::::::::::::::::::::::::::::::::::::::::: 8 3.8.1 Watchpoints and Threads :::::::::::::::::::::::::::::::: 10 3.8.2 x86 Watchpoints ::::::::::::::::::::::::::::::::::::::::: 10 3.9 Checkpoints::::::::::::::::::::::::::::::::::::::::::::::::::: 13 3.10 Observing changes in gdb internals :::::::::::::::::::::::::: 13 4 User Interface:::::::::::::::::::::::::::::::::: 14 4.1 Command Interpreter ::::::::::::::::::::::::::::::::::::::::: 14 4.2 UI-Independent Output|the ui_out Functions:::::::::::::::: 14 4.2.1 Overview and Terminology ::::::::::::::::::::::::::::::: 14 4.2.2 General Conventions ::::::::::::::::::::::::::::::::::::: 15 4.2.3 Table, Tuple and List Functions :::::::::::::::::::::::::: 15 4.2.4 Item Output Functions ::::::::::::::::::::::::::::::::::: 17 4.2.5 Utility Output Functions ::::::::::::::::::::::::::::::::: 19 4.2.6 Examples of Use of ui_out functions ::::::::::::::::::::: 20 4.3 Console Printing :::::::::::::::::::::::::::::::::::::::::::::: 23 4.4 TUI :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 ii 5 libgdb :::::::::::::::::::::::::::::::::::::::::: 23 5.1 libgdb 1.0 ::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 5.2 libgdb 2.0 ::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 5.3 The libgdb Model :::::::::::::::::::::::::::::::::::::::::::: 23 5.4 CLI support :::::::::::::::::::::::::::::::::::::::::::::::::: 24 5.5 libgdb components ::::::::::::::::::::::::::::::::::::::::::: 24 6 Values :::::::::::::::::::::::::::::::::::::::::: 25 6.1 Values :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 7 Stack Frames :::::::::::::::::::::::::::::::::: 26 7.1 Selecting an Unwinder :::::::::::::::::::::::::::::::::::::::: 26 7.2 Unwinding the Frame ID :::::::::::::::::::::::::::::::::::::: 27 7.3 Unwinding Registers :::::::::::::::::::::::::::::::::::::::::: 27 8 Symbol Handling :::::::::::::::::::::::::::::: 28 8.1 Symbol Reading :::::::::::::::::::::::::::::::::::::::::::::: 28 8.2 Partial Symbol Tables::::::::::::::::::::::::::::::::::::::::: 29 8.3 Types::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 31 Fundamental Types (e.g., FT_VOID, FT_BOOLEAN). :::::::::::::::: 31 Type Codes (e.g., TYPE_CODE_PTR, TYPE_CODE_ARRAY). :::::::::: 31 Builtin Types (e.g., builtin_type_void, builtin_type_char). :: 31 8.4 Object File Formats::::::::::::::::::::::::::::::::::::::::::: 31 8.4.1 a.out ::::::::::::::::::::::::::::::::::::::::::::::::::::: 31 8.4.2 COFF ::::::::::::::::::::::::::::::::::::::::::::::::::: 31 8.4.3 ECOFF :::::::::::::::::::::::::::::::::::::::::::::::::: 32 8.4.4 XCOFF :::::::::::::::::::::::::::::::::::::::::::::::::: 32 8.4.5 PE::::::::::::::::::::::::::::::::::::::::::::::::::::::: 32 8.4.6 ELF ::::::::::::::::::::::::::::::::::::::::::::::::::::: 32 8.4.7 SOM::::::::::::::::::::::::::::::::::::::::::::::::::::: 32 8.5 Debugging File Formats ::::::::::::::::::::::::::::::::::::::: 32 8.5.1 stabs::::::::::::::::::::::::::::::::::::::::::::::::::::: 32 8.5.2 COFF ::::::::::::::::::::::::::::::::::::::::::::::::::: 32 8.5.3 Mips debug (Third Eye) :::::::::::::::::::::::::::::::::: 33 8.5.4 DWARF 2 ::::::::::::::::::::::::::::::::::::::::::::::: 33 8.5.5 Compressed DWARF 2 ::::::::::::::::::::::::::::::::::: 33 8.5.6 DWARF 3 ::::::::::::::::::::::::::::::::::::::::::::::: 33 8.5.7 SOM::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 8.6 Adding a New Symbol Reader to gdb ::::::::::::::::::::::::: 33 8.7 Memory Management for Symbol Files :::::::::::::::::::::::: 34 9 Language Support ::::::::::::::::::::::::::::: 34 9.1 Adding a Source Language to gdb :::::::::::::::::::::::::::: 34 iii 10 Host Definition ::::::::::::::::::::::::::::::: 36 10.1 Adding a New Host :::::::::::::::::::::::::::::::::::::::::: 36 10.2 Host Conditionals:::::::::::::::::::::::::::::::::::::::::::: 36 11 Target Architecture Definition :::::::::::::: 37 11.1 Operating System ABI Variant Handling ::::::::::::::::::::: 37 11.2 Initializing a New Architecture ::::::::::::::::::::::::::::::: 40 11.2.1 How an Architecture is Represented ::::::::::::::::::::: 40 11.2.2 Looking Up an Existing Architecture :::::::::::::::::::: 40 11.2.3 Creating a New Architecture :::::::::::::::::::::::::::: 41 11.3 Registers and Memory ::::::::::::::::::::::::::::::::::::::: 42 11.4 Pointers Are Not Always Addresses :::::::::::::::::::::::::: 42 11.5 Address Classes :::::::::::::::::::::::::::::::::::::::::::::: 44 11.6 Register Representation :::::::::::::::::::::::::::::::::::::: 45 11.6.1 Raw and Cooked Registers :::::::::::::::::::::::::::::: 45 11.6.2 Functions and Variables Specifying the Register Architecture :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 45 11.6.3 Functions Giving Register Information::::::::::::::::::: 47 11.6.4 Using Different Register and Memory Data Representations :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 48 11.6.5 Register Caching :::::::::::::::::::::::::::::::::::::::: 49 11.7 Frame Interpretation ::::::::::::::::::::::::::::::::::::::::: 50 11.7.1 All About Stack Frames ::::::::::::::::::::::::::::::::: 50 11.7.2 Frame Handling Terminology :::::::::::::::::::::::::::: 51 11.7.3 Prologue Caches :::::::::::::::::::::::::::::::::::::::: 52 11.7.4 Functions and Variable to Analyze Frames::::::::::::::: 53 11.7.5 Functions to Access Frame Data::::::::::::::::::::::::: 54 11.7.6 Analyzing Stacks|Frame Sniffers ::::::::::::::::::::::: 55 11.8 Inferior Call Setup ::::::::::::::::::::::::::::::::::::::::::: 56 11.8.1 About Dummy Frames :::::::::::::::::::::::::::::::::: 56 11.8.2 Functions Creating Dummy Frames ::::::::::::::::::::: 56 11.9 Adding support for debugging core files :::::::::::::::::::::: 58 11.10 Defining Other Architecture Features:::::::::::::::::::::::: 58 11.11 Adding a New Target ::::::::::::::::::::::::::::::::::::::: 67 12 Target Descriptions :::::::::::::::::::::::::: 68 12.1 Target Descriptions Implementation :::::::::::::::::::::::::: 68 12.2 Adding Target Described Register Support ::::::::::::::::::: 68 13 Target Vector Definition::::::::::::::::::::: 69 13.1 Managing Execution State ::::::::::::::::::::::::::::::::::: 69 13.2 Existing Targets ::::::::::::::::::::::::::::::::::::::::::::: 70 13.2.1 File Targets ::::::::::::::::::::::::::::::::::::::::::::: 70 13.2.2 Standard Protocol and Remote Stubs:::::::::::::::::::: 70 13.2.3 ROM Monitor Interface ::::::::::::::::::::::::::::::::: 70 13.2.4 Custom Protocols ::::::::::::::::::::::::::::::::::::::: 70 13.2.5 Transport Layer::::::::::::::::::::::::::::::::::::::::: 70 13.2.6 Builtin Simulator ::::::::::::::::::::::::::::::::::::::: 70 iv 14 Native Debugging :::::::::::::::::::::::::::: 71 14.1 ptrace ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 71 14.2 /proc :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 72 14.3 win32:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 72 14.4 shared libraries :::::::::::::::::::::::::::::::::::::::::::::: 72 14.5 Native Conditionals :::::::::::::::::::::::::::::::::::::::::: 72 15 Support Libraries :::::::::::::::::::::::::::: 72 15.1 BFD::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 72 15.2 opcodes:::::::::::::::::::::::::::::::::::::::::::::::::::::: 73 15.3 readline:::::::::::::::::::::::::::::::::::::::::::::::::::::: 73 15.4 libiberty ::::::::::::::::::::::::::::::::::::::::::::::::::::: 73 15.4.1 obstacks in gdb:::::::::::::::::::::::::::::::::::::::: 73 15.5 gnu-regex :::::::::::::::::::::::::::::::::::::::::::::::::::: 74 15.6 Array Containers :::::::::::::::::::::::::::::::::::::::::::: 74 15.7 include :::::::::::::::::::::::::::::::::::::::::::::::::::::: 77 16 Coding Standards :::::::::::::::::::::::::::: 77 16.1 gdb C Coding Standards
Recommended publications
  • The GNU Linker
    The GNU linker ld (GNU Binutils) Version 2.37 Steve Chamberlain Ian Lance Taylor Red Hat Inc [email protected], [email protected] The GNU linker Edited by Jeffrey Osier ([email protected]) Copyright c 1991-2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents 1 Overview :::::::::::::::::::::::::::::::::::::::: 1 2 Invocation ::::::::::::::::::::::::::::::::::::::: 3 2.1 Command-line Options ::::::::::::::::::::::::::::::::::::::::: 3 2.1.1 Options Specific to i386 PE Targets :::::::::::::::::::::: 40 2.1.2 Options specific to C6X uClinux targets :::::::::::::::::: 47 2.1.3 Options specific to C-SKY targets :::::::::::::::::::::::: 48 2.1.4 Options specific to Motorola 68HC11 and 68HC12 targets :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 48 2.1.5 Options specific to Motorola 68K target :::::::::::::::::: 48 2.1.6 Options specific to MIPS targets ::::::::::::::::::::::::: 49 2.1.7 Options specific to PDP11 targets :::::::::::::::::::::::: 49 2.2 Environment Variables :::::::::::::::::::::::::::::::::::::::: 50 3 Linker Scripts:::::::::::::::::::::::::::::::::: 51 3.1 Basic Linker Script Concepts :::::::::::::::::::::::::::::::::: 51 3.2 Linker Script
    [Show full text]
  • The “Stabs” Debug Format
    The \stabs" debug format Julia Menapace, Jim Kingdon, David MacKenzie Cygnus Support Cygnus Support Revision TEXinfo 2017-08-23.19 Copyright c 1992{2021 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon, and David MacKenzie. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents 1 Overview of Stabs ::::::::::::::::::::::::::::::: 1 1.1 Overview of Debugging Information Flow ::::::::::::::::::::::: 1 1.2 Overview of Stab Format ::::::::::::::::::::::::::::::::::::::: 1 1.3 The String Field :::::::::::::::::::::::::::::::::::::::::::::::: 2 1.4 A Simple Example in C Source ::::::::::::::::::::::::::::::::: 3 1.5 The Simple Example at the Assembly Level ::::::::::::::::::::: 4 2 Encoding the Structure of the Program ::::::: 7 2.1 Main Program :::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.2 Paths and Names of the Source Files :::::::::::::::::::::::::::: 7 2.3 Names of Include Files:::::::::::::::::::::::::::::::::::::::::: 8 2.4 Line Numbers :::::::::::::::::::::::::::::::::::::::::::::::::: 9 2.5 Procedures ::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 2.6 Nested Procedures::::::::::::::::::::::::::::::::::::::::::::: 11 2.7 Block Structure
    [Show full text]
  • The GNU Configure and Build System
    The GNU configure and build system Ian Lance Taylor Copyright c 1998 Cygnus Solutions Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. i Table of Contents 1 Introduction ............................... 1 1.1 Goals................................................... 1 1.2 Tools ................................................... 1 1.3 History ................................................. 1 1.4 Building ................................................ 2 2 Getting Started............................ 3 2.1 Write configure.in ....................................... 4 2.2 Write Makefile.am ....................................... 6 2.3 Write acconfig.h......................................... 7 2.4 Generate files ........................................... 8 2.5 Example................................................ 8 2.5.1 First Try....................................... 9 2.5.2 Second Try.................................... 10 2.5.3 Third
    [Show full text]
  • Cygwin User's Guide
    Cygwin User’s Guide Cygwin User’s Guide ii Copyright © Cygwin authors Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this per- mission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Cygwin User’s Guide iii Contents 1 Cygwin Overview 1 1.1 What is it? . .1 1.2 Quick Start Guide for those more experienced with Windows . .1 1.3 Quick Start Guide for those more experienced with UNIX . .1 1.4 Are the Cygwin tools free software? . .2 1.5 A brief history of the Cygwin project . .2 1.6 Highlights of Cygwin Functionality . .3 1.6.1 Introduction . .3 1.6.2 Permissions and Security . .3 1.6.3 File Access . .3 1.6.4 Text Mode vs. Binary Mode . .4 1.6.5 ANSI C Library . .4 1.6.6 Process Creation . .5 1.6.6.1 Problems with process creation . .5 1.6.7 Signals . .6 1.6.8 Sockets . .6 1.6.9 Select . .7 1.7 What’s new and what changed in Cygwin . .7 1.7.1 What’s new and what changed in 3.2 .
    [Show full text]
  • The IAR XLINK Linker™ and IAR XLIB Librarian™ Reference Guide
    IAR Linker and Library To o l s Reference Guide Version 4.60 XLINK-460G COPYRIGHT NOTICE © Copyright 1987–2007 IAR Systems. All rights reserved. No part of this document may be reproduced without the prior written consent of IAR Systems. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment on any part of IAR Systems. While the information contained herein is assumed to be accurate, IAR Systems assumes no responsibility for any errors or omissions. In no event shall IAR Systems, its employees, its contractors, or the authors of this document be liable for special, direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claim for lost profits, fees, or expenses of any nature or kind. TRADEMARKS IAR, IAR Systems, IAR Embedded Workbench, IAR MakeApp, C-SPY, visualSTATE, From Idea To Target, IAR KickStart Kit and IAR PowerPac are trademarks or registered trademarks owned by IAR Systems AB. All other product names are trademarks or registered trademarks of their respective owners. EDITION NOTICE April 2007 Part number: XLINK-460G The IAR Linker and Library Tools Reference Guide replaces all versions of the IAR XLINK Linker™ and IAR XLIB Librarian™ Reference Guide. XLINK-460G Contents Tables .....................................................................................................................
    [Show full text]
  • Packet Structure Definition
    xx Tektronix Logic Analyzer Online Help ZZZ PrintedHelpDocument *P077003206* 077-0032-06 Tektronix Logic Analyzer Online Help ZZZ PrintedHelpDocument www.tektronix.com 077-0032-06 Copyright © Tektronix. All rights reserved. Licensed software products are owned by Tektronix or its subsidiaries or suppliers, and are protected by national copyright laws and international treaty provisions. Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supersedes that in all previously published material. Specifications and price change privileges reserved. TEKTRONIX and TEK are registered trademarks of Tektronix, Inc. D-Max, MagniVu, iView, iVerify, iCapture, iLink, PowerFlex, and TekLink are trademarks of Tektronix, Inc. 076-0113-06 077-0032-06 April 27, 2012 Contacting Tektronix Tektronix, Inc. 14150 SWKarlBraunDrive P.O. Box 500 Beaverton, OR 97077 USA For product information, sales, service, and technical support: In North America, call 1-800-833-9200. Worldwide, visit www.tektronix.com to find contacts in your area. Warranty Tektronix warrants that this product will be free from defects in materials and workmanship for a period of one (1) year from the date of shipment. If any such product proves defective during this warranty period, Tektronix, at its option, either will repair the defective product without charge for parts and labor, or will provide a replacement in exchange for the defective product. Parts, modules and replacement products used by Tektronix for warranty work may be new or reconditioned to like new performance. All replaced parts, modules and products become the property of Tektronix. In order to obtain service under this warranty, Customer must notify Tektronix of the defect before the expiration of the warranty period and make suitable arrangements for the performance of service.
    [Show full text]
  • Integrating the GNU Debugger with Cycle Accurate Models a Case Study Using a Verilator Systemc Model of the Openrisc 1000
    Integrating the GNU Debugger with Cycle Accurate Models A Case Study using a Verilator SystemC Model of the OpenRISC 1000 Jeremy Bennett Embecosm Application Note 7. Issue 1 Published March 2009 Legal Notice This work is licensed under the Creative Commons Attribution 2.0 UK: England & Wales License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/uk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. This license means you are free: • to copy, distribute, display, and perform the work • to make derivative works under the following conditions: • Attribution. You must give the original author, Jeremy Bennett of Embecosm (www.embecosm.com), credit; • For any reuse or distribution, you must make clear to others the license terms of this work; • Any of these conditions can be waived if you get permission from the copyright holder, Embecosm; and • Nothing in this license impairs or restricts the author's moral rights. The software for the SystemC cycle accurate model written by Embecosm and used in this document is licensed under the GNU General Public License (GNU General Public License). For detailed licensing information see the file COPYING in the source code. Embecosm is the business name of Embecosm Limited, a private limited company registered in England and Wales. Registration number 6577021. ii Copyright © 2009 Embecosm Limited Table of Contents 1. Introduction ................................................................................................................ 1 1.1. Why Use Cycle Accurate Modeling .................................................................... 1 1.2. Target Audience ................................................................................................ 1 1.3. Open Source ..................................................................................................... 2 1.4. Further Sources of Information ......................................................................... 2 1.4.1.
    [Show full text]
  • IAR Linker and Library Tools Reference Guide
    IAR Linker and Library Tools Reference Guide XLINK-540 XLINK-540 COPYRIGHT NOTICE © 1987–2012 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment on any part of IAR Systems. While the information contained herein is assumed to be accurate, IAR Systems assumes no responsibility for any errors or omissions. In no event shall IAR Systems, its employees, its contractors, or the authors of this document be liable for special, direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claim for lost profits, fees, or expenses of any nature or kind. TRADEMARKS IAR Systems, IAR Embedded Workbench, C-SPY, visualSTATE, The Code to Success, IAR KickStart Kit, I-jet, IAR, and the logotype of IAR Systems are trademarks or registered trademarks owned by IAR Systems AB. Microsoft and Windows are registered trademarks of Microsoft Corporation. Adobe and Acrobat Reader are registered trademarks of Adobe Systems Incorporated. All other product names are trademarks or registered trademarks of their respective owners. EDITION NOTICE June 2012 Part number: XLINK-540 The IAR Linker and Library Tools Reference Guide replaces all versions of the IAR XLINK Linker™ and IAR XLIB Librarian™ Reference Guide. XLINK-540 Contents Tables ........................................................................................................................ 7 Preface ...................................................................................................................... 9 Who should read this guide ................................................................. 9 How to use this guide ............................................................................
    [Show full text]
  • Using Ld the GNU Linker
    Using ld The GNU linker ld version 2 January 1994 Steve Chamberlain Cygnus Support Cygnus Support [email protected], [email protected] Using LD, the GNU linker Edited by Jeffrey Osier (jeff[email protected]) Copyright c 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions. Chapter 1: Overview 1 1 Overview ld combines a number of object and archive files, relocates their data and ties up symbol references. Usually the last step in compiling a program is to run ld. ld accepts Linker Command Language files written in a superset of AT&T’s Link Editor Command Language syntax, to provide explicit and total control over the linking process. This version of ld uses the general purpose BFD libraries to operate on object files. This allows ld to read, combine, and write object files in many different formats—for example, COFF or a.out. Different formats may be linked together to produce any available kind of object file. See Chapter 5 [BFD], page 47, for more information. Aside from its flexibility, the gnu linker is more helpful than other linkers in providing diagnostic information.
    [Show full text]
  • Jaké Je to Vyvíjet Prekladace?
    Jak to zacalo?ˇ What’s GNU? Gnu’s Not Unix! AMD64 port a SUSE GCC dnes Jaké je to vyvíjet prekladaˇ ce?ˇ Jan Hubickaˇ Katedra aplikované matematiky Filosofické problémy informatiky Jak to zacalo?ˇ What’s GNU? Gnu’s Not Unix! AMD64 port a SUSE GCC dnes Co je GCC GNU Compiler collection: • Prekladaˇ cˇ C, C++, obj-C, obj-C++, Fortranu, Ady, Go,. • Podporující více než 50 procesor˚ua nekolikˇ set target˚u(kombinací procesor+OS) • Vyvjený od 80. let jako jeden ze základních balík˚uGNU projektu • První verze vydaná v roce 1987 • Verze 8 vyjde tento týden? • 10m rádek,ˇ cca 100-150 aktivních vývojár˚u,odhademˇ 2000 clovˇ ekoletˇ Hacker na MIT od 1971. V záríˇ 1983 oznamuje GNU operating system. 1984 ochází a venujeˇ se GNU projektu. Zacalˇ vyvíjet základní nástroje Emacs, GCC, GDB, make, . Jak to zacalo?ˇ What’s GNU? Gnu’s Not Unix! AMD64 port a SUSE GCC dnes Richard Mathew Stallman (RMS) vs Xerox 9700 Hacker na MIT od 1971. V záríˇ 1983 oznamuje GNU operating system. 1984 ochází a venujeˇ se GNU projektu. Zacalˇ vyvíjet základní nástroje Emacs, GCC, GDB, make, . Jak to zacalo?ˇ What’s GNU? Gnu’s Not Unix! AMD64 port a SUSE GCC dnes Richard Mathew Stallman (RMS) vs Xerox 9700 Jak to zacalo?ˇ What’s GNU? Gnu’s Not Unix! AMD64 port a SUSE GCC dnes Richard Mathew Stallman (RMS) vs Xerox 9700 Hacker na MIT od 1971. V záríˇ 1983 oznamuje GNU operating system. 1984 ochází a venujeˇ se GNU projektu. Zacalˇ vyvíjet základní nástroje Emacs, GCC, GDB, make, .
    [Show full text]
  • GNU / Linux and Free Software
    GNU / Linux and Free Software GNU / Linux and Free Software An introduction Michael Opdenacker Free Electrons http://free-electrons.com Created with OpenOffice.org 2.x GNU / Linux and Free Software © Copyright 2004-2007, Free Electrons Creative Commons Attribution-ShareAlike 2.5 license http://free-electrons.com Sep 15, 2009 1 Rights to copy Attribution ± ShareAlike 2.5 © Copyright 2004-2007 You are free Free Electrons to copy, distribute, display, and perform the work [email protected] to make derivative works to make commercial use of the work Document sources, updates and translations: Under the following conditions http://free-electrons.com/articles/freesw Attribution. You must give the original author credit. Corrections, suggestions, contributions and Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license translations are welcome! identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/2.5/legalcode GNU / Linux and Free Software © Copyright 2004-2007, Free Electrons Creative Commons Attribution-ShareAlike 2.5 license http://free-electrons.com Sep 15, 2009 2 Contents Unix and its history Free Software licenses and legal issues Free operating systems Successful project highlights Free Software
    [Show full text]
  • Free As in Freedom (2.0): Richard Stallman and the Free Software Revolution
    Free as in Freedom (2.0): Richard Stallman and the Free Software Revolution Sam Williams Second edition revisions by Richard M. Stallman i This is Free as in Freedom 2.0: Richard Stallman and the Free Soft- ware Revolution, a revision of Free as in Freedom: Richard Stallman's Crusade for Free Software. Copyright c 2002, 2010 Sam Williams Copyright c 2010 Richard M. Stallman Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License." Published by the Free Software Foundation 51 Franklin St., Fifth Floor Boston, MA 02110-1335 USA ISBN: 9780983159216 The cover photograph of Richard Stallman is by Peter Hinely. The PDP-10 photograph in Chapter 7 is by Rodney Brooks. The photo- graph of St. IGNUcius in Chapter 8 is by Stian Eikeland. Contents Foreword by Richard M. Stallmanv Preface by Sam Williams vii 1 For Want of a Printer1 2 2001: A Hacker's Odyssey 13 3 A Portrait of the Hacker as a Young Man 25 4 Impeach God 37 5 Puddle of Freedom 59 6 The Emacs Commune 77 7 A Stark Moral Choice 89 8 St. Ignucius 109 9 The GNU General Public License 123 10 GNU/Linux 145 iii iv CONTENTS 11 Open Source 159 12 A Brief Journey through Hacker Hell 175 13 Continuing the Fight 181 Epilogue from Sam Williams: Crushing Loneliness 193 Appendix A { Hack, Hackers, and Hacking 209 Appendix B { GNU Free Documentation License 217 Foreword by Richard M.
    [Show full text]