1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>macholib.dyld — Dyld emulation — macholib 1.7 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.7',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="macholib 1.7 documentation" href="index.html" />
<link rel="next" title="macholib.dylib — Generic dylib path manipulation" href="dylib.html" />
<link rel="prev" title="macholib.SymbolTable — Class to read the symbol table from a Mach-O header" href="SymbolTable.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="dylib.html" title="macholib.dylib — Generic dylib path manipulation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="SymbolTable.html" title="macholib.SymbolTable — Class to read the symbol table from a Mach-O header"
accesskey="P">previous</a> |</li>
<li><a href="index.html">macholib 1.7 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-macholib.dyld">
<span id="macholib-dyld-dyld-emulation"></span><h1><a class="reference internal" href="#module-macholib.dyld" title="macholib.dyld: Emulation of functonality of the dynamic linker"><tt class="xref py py-mod docutils literal"><span class="pre">macholib.dyld</span></tt></a> — Dyld emulation<a class="headerlink" href="#module-macholib.dyld" title="Permalink to this headline">¶</a></h1>
<p>This module defines a number of functions that can be used
to emulate the functionality of the dynamic linker (<tt class="docutils literal"><span class="pre">dyld</span></tt>)
w.r.t. looking for library files and framworks.</p>
<dl class="function">
<dt id="macholib.dyld.dyld_image_suffix">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_image_suffix</tt><big>(</big><span class="optional">[</span><em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_image_suffix" title="Permalink to this definition">¶</a></dt>
<dd><p>Looks up the suffix to append to shared library and
framework names and returns this value when found.
Returns <tt class="docutils literal"><span class="pre">None</span></tt> when no suffix should be appended.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
<p>See the description of <tt class="docutils literal"><span class="pre">DYLD_IMAGE_SUFFIX</span></tt> in the
manual page for dyld(1) for more information.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dydl_framework_path">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dydl_framework_path</tt><big>(</big><span class="optional">[</span><em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dydl_framework_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a user-specified framework search path,
or an empty list when only the default search path
should be used.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
<p>See the description of <tt class="docutils literal"><span class="pre">DYLD_FRAMEWORK_PATH</span></tt> in the
manual page for dyld(1) for more information.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_library_path">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_library_path</tt><big>(</big><span class="optional">[</span><em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_library_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a user-specified library search path,
or an empty list when only the default search path
should be used.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
<p>See the description of <tt class="docutils literal"><span class="pre">DYLD_LIBRARY_PATH</span></tt> in the
manual page for dyld(1) for more information.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_fallback_framework_path">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_fallback_framework_path</tt><big>(</big><span class="optional">[</span><em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_fallback_framework_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a user specified list of of directories where
to look for frameworks that aren’t in their install path,
or an empty list when the default fallback path should
be used.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
<p>See the description of <tt class="docutils literal"><span class="pre">DYLD_FALLBACK_FRAMEWORK_PATH</span></tt> in the
manual page for dyld(1) for more information.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_fallback_library_path">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_fallback_library_path</tt><big>(</big><span class="optional">[</span><em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_fallback_library_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a user specified list of of directories where
to look for libraries that aren’t in their install path,
or an empty list when the default fallback path should
be used.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
<p>See the description of <tt class="docutils literal"><span class="pre">DYLD_FALLBACK_LIBRARY_PATH</span></tt> in the
manual page for dyld(1) for more information.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_image_suffix_search">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_image_suffix_search</tt><big>(</big><em>iterator</em><span class="optional">[</span>, <em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_image_suffix_search" title="Permalink to this definition">¶</a></dt>
<dd><p>Yields all items in <em>iterator</em>, and prepents names
with the image suffix to those items when the suffix
is specified.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_override_search">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_override_search</tt><big>(</big><em>name</em><span class="optional">[</span>, <em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_override_search" title="Permalink to this definition">¶</a></dt>
<dd><p>If <em>name</em> is a framework name yield filesystem
paths relative to the entries in the framework
search path.</p>
<p>Always yield the filesystem paths relative to the
entries in the library search path.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_executable_path_search">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_executable_path_search</tt><big>(</big><em>name</em>, <em>executable_path</em><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_executable_path_search" title="Permalink to this definition">¶</a></dt>
<dd><p>If <em>name</em> is a path starting with <tt class="docutils literal"><span class="pre">@executable_path/</span></tt> yield
the path relative to the specified <em>executable_path</em>.</p>
<p>If <em>executable_path</em> is None nothing is yielded.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_loader_search">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_loader_search</tt><big>(</big><em>name</em>, <em>loader_path</em><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_loader_search" title="Permalink to this definition">¶</a></dt>
<dd><p>If <em>name</em> is a path starting with <tt class="docutils literal"><span class="pre">@loader_path/</span></tt> yield
the path relative to the specified <em>loader_path</em>.</p>
<p>If <em>loader_path</em> is None nothing is yielded.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_default_search">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_default_search</tt><big>(</big><em>name</em><span class="optional">[</span>, <em>env</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_default_search" title="Permalink to this definition">¶</a></dt>
<dd><p>Yield the filesystem locations to look for a dynamic
library or framework using the default locations
used by the system dynamic linker.</p>
<p>This function will look in <tt class="docutils literal"><span class="pre">~/Library/Frameworks</span></tt>
for frameworks, even though the system dynamic linker
doesn’t.</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.dyld_find">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">dyld_find</tt><big>(</big><em>name</em><span class="optional">[</span>, <em>executable_path</em><span class="optional">[</span>, <em>env</em><span class="optional">[</span>, <em>loader</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.dyld_find" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the path of the requested dynamic library,
raises <tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt> when the library cannot be found.</p>
<p>This function searches for the library in the same
locations and de system dynamic linker.</p>
<p>The <em>executable_path</em> should be the filesystem path
of the executable to which the library is linked (either
directly or indirectly).</p>
<p>The <em>env</em> argument is a dictionary, which defaults
to <a class="reference external" href="http://docs.python.org/library/os.html#os.environ" title="(in Python v2.7)"><tt class="xref py py-data docutils literal"><span class="pre">os.environ</span></tt></a>.</p>
<p>The <em>loader_path</em> argument is an optional filesystem path for
the object file (binary of shared library) that references
<em>name</em>.</p>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 1.6: </span>Added the <em>loader_path</em> argument.</p>
</div>
</dd></dl>
<dl class="function">
<dt id="macholib.dyld.framework_find">
<tt class="descclassname">macholib.dyld.</tt><tt class="descname">framework_find</tt><big>(</big><em>fn</em><span class="optional">[</span>, <em>executable_path</em><span class="optional">[</span>, <em>env</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#macholib.dyld.framework_find" title="Permalink to this definition">¶</a></dt>
<dd><p>Find a framework using the same semantics as the
system dynamic linker, but will accept looser names
than the system linker.</p>
<p>This function will return a correct result for input
values like:</p>
<ul class="simple">
<li>Python</li>
<li>Python.framework</li>
<li>Python.framework/Versions/Current</li>
</ul>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="SymbolTable.html"
title="previous chapter"><tt class="docutils literal"><span class="pre">macholib.SymbolTable</span></tt> — Class to read the symbol table from a Mach-O header</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="dylib.html"
title="next chapter"><tt class="docutils literal"><span class="pre">macholib.dylib</span></tt> — Generic dylib path manipulation</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/dyld.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="dylib.html" title="macholib.dylib — Generic dylib path manipulation"
>next</a> |</li>
<li class="right" >
<a href="SymbolTable.html" title="macholib.SymbolTable — Class to read the symbol table from a Mach-O header"
>previous</a> |</li>
<li><a href="index.html">macholib 1.7 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2010-2011, Ronald Oussoren.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
</div>
</body>
</html>
|