blob: 34891eed9a27390a14bdc3c1c03028421a7beb09 [file] [log] [blame]
Misha Brukmaneedba5e2004-09-05 02:56:39 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Chris Lattner61757352004-02-27 06:28:34 +00003<html>
4<head>
5 <title>Object Files: Understanding The Result Of LLVM Compilation</title>
6 <link rel="stylesheet" href="llvm.css" type="text/css">
Misha Brukmaneedba5e2004-09-05 02:56:39 +00007 <style>
8 <!--
9 td { border: 2px solid gray }
10 -->
11 </style>
Chris Lattner61757352004-02-27 06:28:34 +000012</head>
13<body>
Misha Brukmaneedba5e2004-09-05 02:56:39 +000014<div class="doc_title">
15 Object Files: Understanding The Result Of LLVM Compilation
16</div>
17
Chris Lattner61757352004-02-27 06:28:34 +000018<ol>
19 <li><a href="#abstract">Abstract</a></li>
20 <li><a href="#introduction">Introduction</a></li>
21 <li><a href="#files">File Contents</a></li>
22 <li><a href="#rot">Linkage Rules Of Thumb</a>
23 <ol>
24 <li><a href="#always">Always Link vmcore.o, support.a</a>
25 <li><a href="#placeholder">Placeholder</a>
26 </ol>
27 </li>
28</ol>
Chris Lattner7911ce22004-05-23 21:07:27 +000029
30<div class="doc_author">
31 <p>Written by <a href="mailto:rspencer@x10sys.com">Reid Spencer</a></p>
Chris Lattner61757352004-02-27 06:28:34 +000032</div>
Chris Lattner7911ce22004-05-23 21:07:27 +000033
Chris Lattner61757352004-02-27 06:28:34 +000034<!-- ======================================================================= -->
35<div class="doc_section"><a name="abstract">Abstract</a></div>
36<div class="doc_text">
37<p>This document describes the contents of the many objects files and libraries
38that are produced by compiling LLVM. To make use of LLVM this information is
39needed in order to understand what files should be linked into your program.
40</p>
41</div>
42<!-- ======================================================================= -->
43<div class="doc_section"> <a name="introduction">Introduction</a></div>
44<div class="doc_text">
45<p>If you're writing a compiler, virtual machine, or any other utility for
46 LLVM, you'll need to figure out which of the many .a (archive) and .o
47 (object) files you will need to link with to be successful. An
48 understanding of the contents of these files and their inter-relationships
49 will be useful in coming up with an optimal specification for the objects
50 and libraries to link with.
51</p>
52<p>The purpose of this document is to hopefully reduce some of the trial and
53 error that the author experienced in using LLVM.
54</p>
55</div>
56<!-- ======================================================================= -->
57<div class="doc_section"><a name="files"></a>File Contents</div>
58<div class="doc_text">
59<p>The table below provides a summary of the basic contents of each file.</p>
60<table class="doc_table"
Misha Brukmaneedba5e2004-09-05 02:56:39 +000061 style="width:80%; text-align: left; border: 2px solid gray; border-collapse: collapse;">
Chris Lattner61757352004-02-27 06:28:34 +000062<tr class="doc_table">
63 <td colspan="2" class="doc_section">Summary Of LLVM Library And Object Files
64 </td>
65</tr>
66<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000067 <td><h2><u>Library</u></h2></td>
68 <td><h2><u>Description</u></h2></td>
Chris Lattner61757352004-02-27 06:28:34 +000069</tr>
70<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000071 <td>libipo.a</td>
72 <td>
Chris Lattner61757352004-02-27 06:28:34 +000073 An archive of all inter-procedural optimizations.
74 </td>
75</tr>
76<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000077 <td>libscalaropts.a</td>
78 <td>
Chris Lattner61757352004-02-27 06:28:34 +000079 An archive of all scalar optimizations.
80 </td>
81</tr>
82<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000083 <td>libtransforms.a</td>
84 <td>
Chris Lattner0e27c982004-02-27 16:17:20 +000085 An archive of just the level raise pass.
Chris Lattner61757352004-02-27 06:28:34 +000086 </td>
87</tr>
88<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000089 <td>libtarget.a</td>
90 <td>
Chris Lattner0e27c982004-02-27 16:17:20 +000091 An archive containing code generator support for describing
92 target architectures.
Chris Lattner61757352004-02-27 06:28:34 +000093 </td>
94</tr>
95<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000096 <td>libanalysis.a</td>
97 <td>
Chris Lattner0e27c982004-02-27 16:17:20 +000098 An archive containing intra-procedural analyses.
Chris Lattner61757352004-02-27 06:28:34 +000099 </td>
100</tr>
101<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000102 <td>libdatastructure.a</td>
103 <td>
Chris Lattner61757352004-02-27 06:28:34 +0000104 An archive containing optimizations for data structures.
105 </td>
106</tr>
107<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000108 <td>libinstrument.a</td>
109 <td>No idea.</td>
Chris Lattner61757352004-02-27 06:28:34 +0000110</tr>
111<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000112 <td>libregalloc.a</td>
113 <td>Register Allocation code.</td>
Chris Lattner61757352004-02-27 06:28:34 +0000114</tr>
115<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000116 <td>libipa.a</td>
117 <td>
Chris Lattner0e27c982004-02-27 16:17:20 +0000118 An archive containing inter-procedural analyses</td>
Chris Lattner61757352004-02-27 06:28:34 +0000119</tr>
120<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000121 <td>libtransformutils.a</td>
122 <td>
Chris Lattner61757352004-02-27 06:28:34 +0000123 Utiltities for transformations?
124 </td>
125</tr>
126<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000127 <td>libsupport.a</td>
128 <td>General support utilities</td>
Chris Lattner61757352004-02-27 06:28:34 +0000129</tr>
130<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000131 <td>libevar.a</td>
132 <td>Live variable analysis for SPARC</td>
Chris Lattner0e27c982004-02-27 16:17:20 +0000133</tr>
134<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000135 <td><h2><u>Object File</u></h2></td>
136 <td><h2><u>Description</u></h2></td>
Chris Lattner61757352004-02-27 06:28:34 +0000137</tr>
138<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000139 <td>support.o</td>
140 <td>General support utilities</td>
Chris Lattner61757352004-02-27 06:28:34 +0000141</tr>
142<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000143 <td>asmparser.o</td>
144 <td>Assembler Parser</td>
Chris Lattner61757352004-02-27 06:28:34 +0000145</tr>
146<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000147 <td>bcreader.o</td>
148 <td>Byte Code Reader</td>
Chris Lattner61757352004-02-27 06:28:34 +0000149</tr>
150<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000151 <td>bcwriter.o</td>
152 <td>Byte Code Writer</td>
Chris Lattner61757352004-02-27 06:28:34 +0000153</tr>
154<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000155 <td>sched.o</td>
156 <td>SPARC instruction scheduler</td>
Chris Lattner61757352004-02-27 06:28:34 +0000157</tr>
158<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000159 <td>selectiondag.o</td>
160 <td>Aggressive instruction selector for Directed Acyclic Graphs</td>
Chris Lattner61757352004-02-27 06:28:34 +0000161</tr>
162<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000163 <td>transformutils.o</td>
164 <td>Utilities for code transformations</td>
Chris Lattner61757352004-02-27 06:28:34 +0000165</tr>
166<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000167 <td>ipa.o</td>
168 <td>Inter-Procedural Analysis Optimizations</td>
Chris Lattner61757352004-02-27 06:28:34 +0000169</tr>
170<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000171 <td>select.o</td>
172 <td>SPARC instruction selector</td>
Chris Lattner61757352004-02-27 06:28:34 +0000173</tr>
174<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000175 <td>cwriter.o</td>
176 <td>"C" Code Writer</td>
Chris Lattner61757352004-02-27 06:28:34 +0000177</tr>
178<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000179 <td>profpaths.o</td>
180 <td>Path profiling instrumentation</td>
Chris Lattner61757352004-02-27 06:28:34 +0000181</tr>
182<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000183 <td>regalloc.o</td>
184 <td>Register Allocation</td>
Chris Lattner61757352004-02-27 06:28:34 +0000185</tr>
186<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000187 <td>instrument.o</td>
188 <td>Instrumentation? Of What?</td>
Chris Lattner61757352004-02-27 06:28:34 +0000189</tr>
190<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000191 <td>datastructure.o</td>
192 <td>Data Structure Analysis</td>
Chris Lattner61757352004-02-27 06:28:34 +0000193</tr>
194<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000195 <td>codegen.o</td>
196 <td>Native code generation</td>
Chris Lattner61757352004-02-27 06:28:34 +0000197</tr>
198<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000199 <td>livevar.o</td>
200 <td>Live Variable Analysis</td>
Chris Lattner61757352004-02-27 06:28:34 +0000201</tr>
202<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000203 <td>vmcore.o</td>
204 <td>Virtual Machine Core</td>
Chris Lattner61757352004-02-27 06:28:34 +0000205</tr>
206<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000207 <td>lli-interpreter.o</td>
208 <td>Interpreter for LLVM ByteCode</td>
Chris Lattner61757352004-02-27 06:28:34 +0000209</tr>
210<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000211 <td>lli-jit.o</td>
212 <td>
Chris Lattner61757352004-02-27 06:28:34 +0000213 Just-In-Time Compiler For LLVM ByteCode
214 </td>
215</tr>
216<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000217 <td>executionengine.o</td>
218 <td>Engine for LLI</td>
Chris Lattner61757352004-02-27 06:28:34 +0000219</tr>
220<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000221 <td>debugger.o</td>
222 <td>Source Level Debugging Support</td>
Chris Lattner61757352004-02-27 06:28:34 +0000223</tr>
224<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000225 <td>analysis.o</td>
226 <td>General Framework For Analysis?</td>
Chris Lattner61757352004-02-27 06:28:34 +0000227</tr>
228<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000229 <td>sparc.o</td>
230 <td>Sun SPARC Processor Specific</td>
Chris Lattner61757352004-02-27 06:28:34 +0000231</tr>
232<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000233 <td>target.o</td>
234 <td>Target Machine Support?</td>
Chris Lattner61757352004-02-27 06:28:34 +0000235</tr>
236<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000237 <td>transforms.o</td>
238 <td>Code Transformations</td>
Chris Lattner61757352004-02-27 06:28:34 +0000239</tr>
240<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000241 <td>x86.o</td>
242 <td>Intel x86 Processor Specific</td>
Chris Lattner61757352004-02-27 06:28:34 +0000243</tr>
244<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000245 <td>powerpc.o</td>
246 <td>PowerPC Processor Specific</td>
Chris Lattner61757352004-02-27 06:28:34 +0000247</tr>
248<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000249 <td>scalaropts.o</td>
250 <td>Optimizations For Scalars</td>
Chris Lattner61757352004-02-27 06:28:34 +0000251</tr>
252<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000253 <td>ipo.o</td>
254 <td>Inter-Procedural Optimization</td>
Chris Lattner61757352004-02-27 06:28:34 +0000255</tr>
256<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000257 <td>trace.o</td>
258 <td>Support For Tracing/Debugging?</td>
Chris Lattner61757352004-02-27 06:28:34 +0000259</tr>
260<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000261 <td>profile_rt.o</td>
262 <td>Runtime Library For Profiler</td>
Chris Lattner61757352004-02-27 06:28:34 +0000263</tr>
264<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000265 <td>sample.o</td>
266 <td>Sample Program ?</td>
Chris Lattner61757352004-02-27 06:28:34 +0000267</tr>
268<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000269 <td>stkr_compiler.o</td>
270 <td>Stacker Language Compiler Library</td>
Chris Lattner61757352004-02-27 06:28:34 +0000271</tr>
272<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000273 <td>stkr_runtime.o</td>
274 <td>Stacker Language Runtime Library</td>
Chris Lattner61757352004-02-27 06:28:34 +0000275</tr>
276</table>
277</div>
278<p></p>
279<!-- ======================================================================= -->
280<div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div>
281<div class="doc_text">
282 <p>This section contains various "rules of thumb" about what files you
283 should link into your programs.</p>
284</div>
285<!-- ======================================================================= -->
286<div class="doc_subsection"><a name="always">Always Link vmcore.o support.a</a>
287</div>
288<div class="doc_text">
289 <p>No matter what you do with LLVM, you'll always need to link with vmcore.o
290 and support.a.</p>
291</div>
292<!-- ======================================================================= -->
293<div class="doc_subsection"><a name="Placeholder">Placeholder</a></div>
294<div class="doc_text">
295 <p>Need more rules of thumb here.</p>
296</div>
297<!-- ======================================================================= -->
298<hr>
299<div class="doc_footer">
300<address><a href="mailto:rspencer@x10sys.com">Reid Spencer</a></address>
301<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
302<br>Last modified: $Date$ </div>
303</body>
304</html>
305<!-- vim: sw=2 ts=2 ai
306-->