XGC User's Guide

Using the Assembler Linker and Utilities

Free Software Foundation

Chris Nettleton

Acknowledgments

This guide is based on documentation distributed by the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

License

This guide is distributed under the terms of the GNU Public license. Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this document 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 document into another language, under the above conditions for modified versions.


Table of Contents
About this Guide
Audience
Related Documents
Reader's Comments
Documentation Conventions
I. Using the Macro Assembler
1. Summary
as -- The Assembler
2. Overview
2.1. Object File Formats
2.2. Command Line
2.3. Input Files
2.4. Output (Object) File
2.5. Error and Warning Messages
3. Assembler Command-Line Options
4. Assembler Syntax
4.1. Preprocessing
4.2. White-space
4.3. Comments
4.4. Symbols
4.5. Statements
4.6. Constants
5. Sections and Relocation
5.1. Background
5.2. Linker Sections
5.3. Sub-Sections
5.4. bss Section
6. Assembler Symbols
6.1. Labels
6.2. Giving Symbols Other Values
6.3. Symbol Names
6.4. The Special Dot Symbol
6.5. Symbol Attributes
7. Assembler Expressions
7.1. Empty Expressions
7.2. Integer Expressions
8. Assembler Directives
.abort -- 
.ABORT -- 
.align -- 
.app-file -- 
.ascii -- 
.asciz -- 
.balign[wl] -- 
.byte -- 
.comm -- 
.data -- 
.def -- 
.dim -- 
.double -- 
.eject -- 
.else -- 
.endef -- 
.endif -- 
.equ -- 
.equiv -- 
.err -- 
.extern -- 
.file -- 
.fill -- 
.float -- 
.global -- 
.hword -- 
.ident -- 
.if -- 
.include -- 
.int -- 
.irp -- 
.irpc -- 
.lcomm -- 
.lflags -- 
.line -- 
.linkonce -- 
.ln -- 
.list -- 
.long -- 
.macro -- 
.nolist -- 
.octa -- 
.org -- 
.p2align[wl] -- 
.psize -- 
.quad -- 
.rept -- 
.sbttl -- 
.scl -- 
.section -- 
.set -- 
.short -- 
.single -- 
.size -- 
.skip -- 
.space -- 
.stabd, .stabn, .stabs -- 
.string -- 
.tag -- 
.text -- 
.title -- 
.type -- 
.val -- 
.word -- 
II. Using the Linker
9. Linker Overview
10. Linker Invocation
10.1. Command Line Options
10.2. Environment Variables
11. Linker Command Language
11.1. Linker Scripts
11.2. Expressions
11.3. Memory Layout
11.4. Specifying Output Sections
11.5. The Entry Point
11.6. Version Script
11.7. Option Commands
III. Using the Object Code Utilities
12. The Utilities
12.1. ar
12.2. nm
12.3. objcopy
12.4. objdump
12.5. ranlib
12.6. size
12.7. strings
12.8. strip
12.9. c++filt
12.10. addr2line
13. Selecting the target system
13.1. Target Selection
13.2. Architecture selection
13.3. Linker emulation selection
IV. Appendices
A. BFD
A.1. How it Works: An Outline of BFD
Index