blob: 1fb5fc84c90985b580287021eb897c97117ac63a [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>
Misha Brukman21618342004-09-05 03:20:18 +000073 An archive of all interprocedural optimizations.
Chris Lattner61757352004-02-27 06:28:34 +000074 </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>
Misha Brukman21618342004-09-05 03:20:18 +000084 <td>Uncategorized transformations.</td>
Chris Lattner61757352004-02-27 06:28:34 +000085</tr>
86<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000087 <td>libtarget.a</td>
Misha Brukman21618342004-09-05 03:20:18 +000088 <td>An archive containing generic code generator support.</td>
Chris Lattner61757352004-02-27 06:28:34 +000089</tr>
90<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000091 <td>libanalysis.a</td>
Misha Brukman21618342004-09-05 03:20:18 +000092 <td>An archive containing intraprocedural analyses.</td>
Chris Lattner61757352004-02-27 06:28:34 +000093</tr>
94<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000095 <td>libdatastructure.a</td>
Misha Brukman100bd712004-09-05 03:57:23 +000096 <td>An archive containing Data Structure Analysis.</td>
Chris Lattner61757352004-02-27 06:28:34 +000097</tr>
98<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +000099 <td>libinstrument.a</td>
Misha Brukman21618342004-09-05 03:20:18 +0000100 <td>Intraprocedural instrumentation and utilities.</td>
Chris Lattner61757352004-02-27 06:28:34 +0000101</tr>
102<tr class="doc_table">
Misha Brukman21618342004-09-05 03:20:18 +0000103 <td>libsparcv9regalloc.a</td>
104 <td>SparcV9 graph-coloring register allocator.</td>
Chris Lattner61757352004-02-27 06:28:34 +0000105</tr>
106<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000107 <td>libipa.a</td>
Misha Brukman21618342004-09-05 03:20:18 +0000108 <td>An archive containing interprocedural analyses</td>
Chris Lattner61757352004-02-27 06:28:34 +0000109</tr>
110<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000111 <td>libtransformutils.a</td>
Misha Brukman21618342004-09-05 03:20:18 +0000112 <td>Utility functions for transformations.</td>
Chris Lattner61757352004-02-27 06:28:34 +0000113</tr>
114<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000115 <td>libsupport.a</td>
116 <td>General support utilities</td>
Chris Lattner61757352004-02-27 06:28:34 +0000117</tr>
118<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000119 <td><h2><u>Object File</u></h2></td>
120 <td><h2><u>Description</u></h2></td>
Chris Lattner61757352004-02-27 06:28:34 +0000121</tr>
122<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000123 <td>support.o</td>
124 <td>General support utilities</td>
Chris Lattner61757352004-02-27 06:28:34 +0000125</tr>
126<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000127 <td>asmparser.o</td>
128 <td>Assembler Parser</td>
Chris Lattner61757352004-02-27 06:28:34 +0000129</tr>
130<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000131 <td>bcreader.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000132 <td>Bytecode Reader</td>
Chris Lattner61757352004-02-27 06:28:34 +0000133</tr>
134<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000135 <td>bcwriter.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000136 <td>Bytecode Writer</td>
Chris Lattner61757352004-02-27 06:28:34 +0000137</tr>
138<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000139 <td>sched.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000140 <td>SparcV9 instruction scheduler</td>
Chris Lattner61757352004-02-27 06:28:34 +0000141</tr>
142<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000143 <td>selectiondag.o</td>
144 <td>Aggressive instruction selector for Directed Acyclic Graphs</td>
Chris Lattner61757352004-02-27 06:28:34 +0000145</tr>
146<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000147 <td>transformutils.o</td>
148 <td>Utilities for code transformations</td>
Chris Lattner61757352004-02-27 06:28:34 +0000149</tr>
150<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000151 <td>ipa.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000152 <td>Interprocedural Analyses</td>
Chris Lattner61757352004-02-27 06:28:34 +0000153</tr>
154<tr class="doc_table">
Misha Brukman21618342004-09-05 03:20:18 +0000155 <td>sparcv9select.o</td>
156 <td>SparcV9 instruction selector</td>
Chris Lattner61757352004-02-27 06:28:34 +0000157</tr>
158<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000159 <td>cwriter.o</td>
160 <td>"C" Code Writer</td>
Chris Lattner61757352004-02-27 06:28:34 +0000161</tr>
162<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000163 <td>profpaths.o</td>
164 <td>Path profiling instrumentation</td>
Chris Lattner61757352004-02-27 06:28:34 +0000165</tr>
166<tr class="doc_table">
Misha Brukman21618342004-09-05 03:20:18 +0000167 <td>sparcv9regalloc.o</td>
168 <td>SparcV9 graph-coloring register allocator</td>
Chris Lattner61757352004-02-27 06:28:34 +0000169</tr>
170<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000171 <td>instrument.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000172 <td>Intraprocedural instrumentation and utilities.</td>
Chris Lattner61757352004-02-27 06:28:34 +0000173</tr>
174<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000175 <td>datastructure.o</td>
Misha Brukman100bd712004-09-05 03:57:23 +0000176 <td>Data Structure Analysis</td>
Chris Lattner61757352004-02-27 06:28:34 +0000177</tr>
178<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000179 <td>codegen.o</td>
180 <td>Native code generation</td>
Chris Lattner61757352004-02-27 06:28:34 +0000181</tr>
182<tr class="doc_table">
Misha Brukman21618342004-09-05 03:20:18 +0000183 <td>sparcv9livevar.o</td>
184 <td>SparcV9 Live Variable Analysis</td>
Chris Lattner61757352004-02-27 06:28:34 +0000185</tr>
186<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000187 <td>vmcore.o</td>
188 <td>Virtual Machine Core</td>
Chris Lattner61757352004-02-27 06:28:34 +0000189</tr>
190<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000191 <td>lli-interpreter.o</td>
192 <td>Interpreter for LLVM ByteCode</td>
Chris Lattner61757352004-02-27 06:28:34 +0000193</tr>
194<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000195 <td>lli-jit.o</td>
196 <td>
Chris Lattner61757352004-02-27 06:28:34 +0000197 Just-In-Time Compiler For LLVM ByteCode
198 </td>
199</tr>
200<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000201 <td>executionengine.o</td>
202 <td>Engine for LLI</td>
Chris Lattner61757352004-02-27 06:28:34 +0000203</tr>
204<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000205 <td>debugger.o</td>
206 <td>Source Level Debugging Support</td>
Chris Lattner61757352004-02-27 06:28:34 +0000207</tr>
208<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000209 <td>analysis.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000210 <td>General framework for Analysis</td>
Chris Lattner61757352004-02-27 06:28:34 +0000211</tr>
212<tr class="doc_table">
Misha Brukman21618342004-09-05 03:20:18 +0000213 <td>sparcv9.o</td>
214 <td>SparcV9 backend</td>
Chris Lattner61757352004-02-27 06:28:34 +0000215</tr>
216<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000217 <td>target.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000218 <td>Generic backend support</td>
Chris Lattner61757352004-02-27 06:28:34 +0000219</tr>
220<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000221 <td>transforms.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000222 <td>Uncategorized transformations.</td>
Chris Lattner61757352004-02-27 06:28:34 +0000223</tr>
224<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000225 <td>x86.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000226 <td>Intel x86 backend</td>
Chris Lattner61757352004-02-27 06:28:34 +0000227</tr>
228<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000229 <td>powerpc.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000230 <td>PowerPC backend</td>
Chris Lattner61757352004-02-27 06:28:34 +0000231</tr>
232<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000233 <td>scalaropts.o</td>
234 <td>Optimizations For Scalars</td>
Chris Lattner61757352004-02-27 06:28:34 +0000235</tr>
236<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000237 <td>ipo.o</td>
Misha Brukman21618342004-09-05 03:20:18 +0000238 <td>Interprocedural Optimizations</td>
Chris Lattner61757352004-02-27 06:28:34 +0000239</tr>
240<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000241 <td>trace.o</td>
242 <td>Support For Tracing/Debugging?</td>
Chris Lattner61757352004-02-27 06:28:34 +0000243</tr>
244<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000245 <td>profile_rt.o</td>
246 <td>Runtime Library For Profiler</td>
Chris Lattner61757352004-02-27 06:28:34 +0000247</tr>
248<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000249 <td>sample.o</td>
250 <td>Sample Program ?</td>
Chris Lattner61757352004-02-27 06:28:34 +0000251</tr>
252<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000253 <td>stkr_compiler.o</td>
254 <td>Stacker Language Compiler Library</td>
Chris Lattner61757352004-02-27 06:28:34 +0000255</tr>
256<tr class="doc_table">
Misha Brukmaneedba5e2004-09-05 02:56:39 +0000257 <td>stkr_runtime.o</td>
258 <td>Stacker Language Runtime Library</td>
Chris Lattner61757352004-02-27 06:28:34 +0000259</tr>
260</table>
261</div>
262<p></p>
263<!-- ======================================================================= -->
264<div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div>
265<div class="doc_text">
266 <p>This section contains various "rules of thumb" about what files you
267 should link into your programs.</p>
268</div>
269<!-- ======================================================================= -->
270<div class="doc_subsection"><a name="always">Always Link vmcore.o support.a</a>
271</div>
272<div class="doc_text">
273 <p>No matter what you do with LLVM, you'll always need to link with vmcore.o
274 and support.a.</p>
275</div>
276<!-- ======================================================================= -->
277<div class="doc_subsection"><a name="Placeholder">Placeholder</a></div>
278<div class="doc_text">
279 <p>Need more rules of thumb here.</p>
280</div>
281<!-- ======================================================================= -->
282<hr>
283<div class="doc_footer">
284<address><a href="mailto:rspencer@x10sys.com">Reid Spencer</a></address>
285<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
286<br>Last modified: $Date$ </div>
287</body>
288</html>
289<!-- vim: sw=2 ts=2 ai
290-->