blob: d6ce8fa4ccc5e89568ea41195eda0f2ec450c4d3 [file] [log] [blame]
Chris Lattner61757352004-02-27 06:28:34 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2<html>
3<head>
4 <title>Object Files: Understanding The Result Of LLVM Compilation</title>
5 <link rel="stylesheet" href="llvm.css" type="text/css">
6</head>
7<body>
8<div class="doc_title">Object Files: Understanding The Result Of LLVM Compilation</div>
9<hr>
10<ol>
11 <li><a href="#abstract">Abstract</a></li>
12 <li><a href="#introduction">Introduction</a></li>
13 <li><a href="#files">File Contents</a></li>
14 <li><a href="#rot">Linkage Rules Of Thumb</a>
15 <ol>
16 <li><a href="#always">Always Link vmcore.o, support.a</a>
17 <li><a href="#placeholder">Placeholder</a>
18 </ol>
19 </li>
20</ol>
21<div class="doc_text">
22<p><b>Written by <a href="mailto:rspencer@x10sys.com">Reid Spencer</a> </b></p>
23<p> </p>
24</div>
25<hr>
26<!-- ======================================================================= -->
27<div class="doc_section"><a name="abstract">Abstract</a></div>
28<div class="doc_text">
29<p>This document describes the contents of the many objects files and libraries
30that are produced by compiling LLVM. To make use of LLVM this information is
31needed in order to understand what files should be linked into your program.
32</p>
33</div>
34<!-- ======================================================================= -->
35<div class="doc_section"> <a name="introduction">Introduction</a></div>
36<div class="doc_text">
37<p>If you're writing a compiler, virtual machine, or any other utility for
38 LLVM, you'll need to figure out which of the many .a (archive) and .o
39 (object) files you will need to link with to be successful. An
40 understanding of the contents of these files and their inter-relationships
41 will be useful in coming up with an optimal specification for the objects
42 and libraries to link with.
43</p>
44<p>The purpose of this document is to hopefully reduce some of the trial and
45 error that the author experienced in using LLVM.
46</p>
47</div>
48<!-- ======================================================================= -->
49<div class="doc_section"><a name="files"></a>File Contents</div>
50<div class="doc_text">
51<p>The table below provides a summary of the basic contents of each file.</p>
52<table class="doc_table"
53 style="width:80%; text-align: left; border: 2px solid blue; border-collapse: collapse;">
54<tr class="doc_table">
55 <td colspan="2" class="doc_section">Summary Of LLVM Library And Object Files
56 </td>
57</tr>
58<tr class="doc_table">
59 <td style="border: 2px solid blue"><h2><u>Library</u></h2></td>
60 <td style="border: 2px solid blue"><h2><u>Description</u></h2></td>
61</tr>
62<tr class="doc_table">
63 <td style="border: 2px solid blue">libipo.a</td>
64 <td style="border: 2px solid blue">
65 An archive of all inter-procedural optimizations.
66 </td>
67</tr>
68<tr class="doc_table">
69 <td style="border: 2px solid blue">libscalaropts.a</td>
70 <td style="border: 2px solid blue">
71 An archive of all scalar optimizations.
72 </td>
73</tr>
74<tr class="doc_table">
75 <td style="border: 2px solid blue">libtransforms.a</td>
76 <td style="border: 2px solid blue">
77 An archive of all code transformations.
78 </td>
79</tr>
80<tr class="doc_table">
81 <td style="border: 2px solid blue">libtarget.a</td>
82 <td style="border: 2px solid blue">
83 An archive containing target (machine) specific code.
84 </td>
85</tr>
86<tr class="doc_table">
87 <td style="border: 2px solid blue">libanalysis.a</td>
88 <td style="border: 2px solid blue">
89 An archive containing analysis code.
90 </td>
91</tr>
92<tr class="doc_table">
93 <td style="border: 2px solid blue">libdatastructure.a</td>
94 <td style="border: 2px solid blue">
95 An archive containing optimizations for data structures.
96 </td>
97</tr>
98<tr class="doc_table">
99 <td style="border: 2px solid blue">libinstrument.a</td>
100 <td style="border: 2px solid blue">No idea.</td>
101</tr>
102<tr class="doc_table">
103 <td style="border: 2px solid blue">libregalloc.a</td>
104 <td style="border: 2px solid blue">Register Allocation code.</td>
105</tr>
106<tr class="doc_table">
107 <td style="border: 2px solid blue">libipa.a</td>
108 <td style="border: 2px solid blue">Inter-procedural ??</td>
109</tr>
110<tr class="doc_table">
111 <td style="border: 2px solid blue">libtransformutils.a</td>
112 <td style="border: 2px solid blue">
113 Utiltities for transformations?
114 </td>
115</tr>
116<tr class="doc_table">
117 <td style="border: 2px solid blue">libsupport.a</td>
118 <td style="border: 2px solid blue">General support utilities</td>
119</tr>
120<tr class="doc_table">
121 <td style="border: 2px solid blue"><h2><u>Object File</u></h2></td>
122 <td style="border: 2px solid blue"><h2><u>Description</u></h2></td>
123</tr>
124<tr class="doc_table">
125 <td style="border: 2px solid blue">support.o</td>
126 <td style="border: 2px solid blue">General support utilities</td>
127</tr>
128<tr class="doc_table">
129 <td style="border: 2px solid blue">asmparser.o</td>
130 <td style="border: 2px solid blue">Assembler Parser</td>
131</tr>
132<tr class="doc_table">
133 <td style="border: 2px solid blue">bcreader.o</td>
134 <td style="border: 2px solid blue">Byte Code Reader</td>
135</tr>
136<tr class="doc_table">
137 <td style="border: 2px solid blue">bcwriter.o</td>
138 <td style="border: 2px solid blue">Byte Code Writer</td>
139</tr>
140<tr class="doc_table">
141 <td style="border: 2px solid blue">sched.o</td>
142 <td style="border: 2px solid blue">Scheduler? For What?</td>
143</tr>
144<tr class="doc_table">
145 <td style="border: 2px solid blue">selectiondag.o</td>
146 <td style="border: 2px solid blue">Selection Directed Acyclic Graph?</td>
147</tr>
148<tr class="doc_table">
149 <td style="border: 2px solid blue">transformutils.o</td>
150 <td style="border: 2px solid blue">Utilities for code transformations</td>
151</tr>
152<tr class="doc_table">
153 <td style="border: 2px solid blue">ipa.o</td>
154 <td style="border: 2px solid blue">Inter-Procedural Analysis Optimizations</td>
155</tr>
156<tr class="doc_table">
157 <td style="border: 2px solid blue">select.o</td>
158 <td style="border: 2px solid blue">Select Statement?</td>
159</tr>
160<tr class="doc_table">
161 <td style="border: 2px solid blue">cwriter.o</td>
162 <td style="border: 2px solid blue">"C" Code Writer</td>
163</tr>
164<tr class="doc_table">
165 <td style="border: 2px solid blue">profpaths.o</td>
166 <td style="border: 2px solid blue">Profile Paths?</td>
167</tr>
168<tr class="doc_table">
169 <td style="border: 2px solid blue">regalloc.o</td>
170 <td style="border: 2px solid blue">Register Allocation</td>
171</tr>
172<tr class="doc_table">
173 <td style="border: 2px solid blue">instrument.o</td>
174 <td style="border: 2px solid blue">Instrumentation? Of What?</td>
175</tr>
176<tr class="doc_table">
177 <td style="border: 2px solid blue">datastructure.o</td>
178 <td style="border: 2px solid blue">Data Structure Analysis</td>
179</tr>
180<tr class="doc_table">
181 <td style="border: 2px solid blue">codegen.o</td>
182 <td style="border: 2px solid blue">Native code generation</td>
183</tr>
184<tr class="doc_table">
185 <td style="border: 2px solid blue">livevar.o</td>
186 <td style="border: 2px solid blue">Live Variable Analysis</td>
187</tr>
188<tr class="doc_table">
189 <td style="border: 2px solid blue">vmcore.o</td>
190 <td style="border: 2px solid blue">Virtual Machine Core</td>
191</tr>
192<tr class="doc_table">
193 <td style="border: 2px solid blue">lli-interpreter.o</td>
194 <td style="border: 2px solid blue">Interpreter for LLVM ByteCode</td>
195</tr>
196<tr class="doc_table">
197 <td style="border: 2px solid blue">lli-jit.o</td>
198 <td style="border: 2px solid blue">
199 Just-In-Time Compiler For LLVM ByteCode
200 </td>
201</tr>
202<tr class="doc_table">
203 <td style="border: 2px solid blue">executionengine.o</td>
204 <td style="border: 2px solid blue">Engine for LLI</td>
205</tr>
206<tr class="doc_table">
207 <td style="border: 2px solid blue">debugger.o</td>
208 <td style="border: 2px solid blue">Source Level Debugging Support</td>
209</tr>
210<tr class="doc_table">
211 <td style="border: 2px solid blue">analysis.o</td>
212 <td style="border: 2px solid blue">General Framework For Analysis?</td>
213</tr>
214<tr class="doc_table">
215 <td style="border: 2px solid blue">sparc.o</td>
216 <td style="border: 2px solid blue">Sun SPARC Processor Specific</td>
217</tr>
218<tr class="doc_table">
219 <td style="border: 2px solid blue">target.o</td>
220 <td style="border: 2px solid blue">Target Machine Support?</td>
221</tr>
222<tr class="doc_table">
223 <td style="border: 2px solid blue">transforms.o</td>
224 <td style="border: 2px solid blue">Code Transformations</td>
225</tr>
226<tr class="doc_table">
227 <td style="border: 2px solid blue">x86.o</td>
228 <td style="border: 2px solid blue">Intel x86 Processor Specific</td>
229</tr>
230<tr class="doc_table">
231 <td style="border: 2px solid blue">powerpc.o</td>
232 <td style="border: 2px solid blue">PowerPC Processor Specific</td>
233</tr>
234<tr class="doc_table">
235 <td style="border: 2px solid blue">scalaropts.o</td>
236 <td style="border: 2px solid blue">Optimizations For Scalars</td>
237</tr>
238<tr class="doc_table">
239 <td style="border: 2px solid blue">ipo.o</td>
240 <td style="border: 2px solid blue">Inter-Procedural Optimization</td>
241</tr>
242<tr class="doc_table">
243 <td style="border: 2px solid blue">trace.o</td>
244 <td style="border: 2px solid blue">Support For Tracing/Debugging?</td>
245</tr>
246<tr class="doc_table">
247 <td style="border: 2px solid blue">profile_rt.o</td>
248 <td style="border: 2px solid blue">Runtime Library For Profiler</td>
249</tr>
250<tr class="doc_table">
251 <td style="border: 2px solid blue">sample.o</td>
252 <td style="border: 2px solid blue">Sample Program ?</td>
253</tr>
254<tr class="doc_table">
255 <td style="border: 2px solid blue">stkr_compiler.o</td>
256 <td style="border: 2px solid blue">Stacker Language Compiler Library</td>
257</tr>
258<tr class="doc_table">
259 <td style="border: 2px solid blue">stkr_runtime.o</td>
260 <td style="border: 2px solid blue">Stacker Language Runtime Library</td>
261</tr>
262</table>
263</div>
264<p></p>
265<!-- ======================================================================= -->
266<div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div>
267<div class="doc_text">
268 <p>This section contains various "rules of thumb" about what files you
269 should link into your programs.</p>
270</div>
271<!-- ======================================================================= -->
272<div class="doc_subsection"><a name="always">Always Link vmcore.o support.a</a>
273</div>
274<div class="doc_text">
275 <p>No matter what you do with LLVM, you'll always need to link with vmcore.o
276 and support.a.</p>
277</div>
278<!-- ======================================================================= -->
279<div class="doc_subsection"><a name="Placeholder">Placeholder</a></div>
280<div class="doc_text">
281 <p>Need more rules of thumb here.</p>
282</div>
283<!-- ======================================================================= -->
284<hr>
285<div class="doc_footer">
286<address><a href="mailto:rspencer@x10sys.com">Reid Spencer</a></address>
287<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
288<br>Last modified: $Date$ </div>
289</body>
290</html>
291<!-- vim: sw=2 ts=2 ai
292-->