Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Side by Side Diff: native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html

Issue 438403003: [NaCl SDK Docs] Only generate one top-level <section> element. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 {{+bindTo:partials.standard_nacl_article}} 1 {{+bindTo:partials.standard_nacl_article}}
2 2
3 <section id="dynamic-linking-and-loading-with-glibc"> 3 <section id="dynamic-linking-and-loading-with-glibc">
4 <h1 id="dynamic-linking-and-loading-with-glibc">Dynamic Linking and Loading with glibc</h1> 4 <h1 id="dynamic-linking-and-loading-with-glibc">Dynamic Linking and Loading with glibc</h1>
5 <div class="contents local" id="contents" style="display: none"> 5 <div class="contents local" id="contents" style="display: none">
6 <ul class="small-gap"> 6 <ul class="small-gap">
7 <li><p class="first"><a class="reference internal" href="#introduction" id="id1" >Introduction</a></p> 7 <li><p class="first"><a class="reference internal" href="#introduction" id="id1" >Introduction</a></p>
8 <ul class="small-gap"> 8 <ul class="small-gap">
9 <li><a class="reference internal" href="#c-standard-libraries-glibc-and-newlib" id="id2">C standard libraries: glibc and newlib</a></li> 9 <li><a class="reference internal" href="#c-standard-libraries-glibc-and-newlib" id="id2">C standard libraries: glibc and newlib</a></li>
10 <li><a class="reference internal" href="#sdk-toolchains" id="id3">SDK toolchains </a></li> 10 <li><a class="reference internal" href="#sdk-toolchains" id="id3">SDK toolchains </a></li>
11 <li><a class="reference internal" href="#specifying-and-delivering-shared-librar ies" id="id4">Specifying and delivering shared libraries</a></li> 11 <li><a class="reference internal" href="#specifying-and-delivering-shared-librar ies" id="id4">Specifying and delivering shared libraries</a></li>
12 </ul> 12 </ul>
13 </li> 13 </li>
14 <li><a class="reference internal" href="#building-a-dynamically-linked-applicati on" id="id5">Building a dynamically linked application</a></li> 14 <li><a class="reference internal" href="#building-a-dynamically-linked-applicati on" id="id5">Building a dynamically linked application</a></li>
15 <li><a class="reference internal" href="#generating-a-native-client-manifest-fil e-for-a-dynamically-linked-application" id="id6">Generating a Native Client mani fest file for a dynamically linked application</a></li> 15 <li><a class="reference internal" href="#generating-a-native-client-manifest-fil e-for-a-dynamically-linked-application" id="id6">Generating a Native Client mani fest file for a dynamically linked application</a></li>
16 <li><a class="reference internal" href="#deploying-a-dynamically-linked-applicat ion" id="id7">Deploying a dynamically linked application</a></li> 16 <li><a class="reference internal" href="#deploying-a-dynamically-linked-applicat ion" id="id7">Deploying a dynamically linked application</a></li>
17 <li><a class="reference internal" href="#opening-a-shared-library-at-runtime" id ="id8">Opening a shared library at runtime</a></li> 17 <li><a class="reference internal" href="#opening-a-shared-library-at-runtime" id ="id8">Opening a shared library at runtime</a></li>
18 <li><a class="reference internal" href="#troubleshooting" id="id9">Troubleshooti ng</a></li> 18 <li><a class="reference internal" href="#troubleshooting" id="id9">Troubleshooti ng</a></li>
19 </ul> 19 </ul>
20 20
21 </div><section id="introduction"> 21 </div><h2 id="introduction">Introduction</h2>
22 <h2 id="introduction">Introduction</h2>
23 <aside class="caution"> 22 <aside class="caution">
24 Portable Native Client currently only supports static linking, and the 23 Portable Native Client currently only supports static linking, and the
25 only C library available for it is newlib. This page is only valid for 24 only C library available for it is newlib. This page is only valid for
26 Native Client, though PNaCl will eventually support some form of 25 Native Client, though PNaCl will eventually support some form of
27 dynamic linking. 26 dynamic linking.
28 </aside> 27 </aside>
29 <p>This document describes how to create and deploy dynamically linked and loade d 28 <p>This document describes how to create and deploy dynamically linked and loade d
30 applications with the glibc library in the Native Client SDK. Before reading 29 applications with the glibc library in the Native Client SDK. Before reading
31 this document, we recommend reading <a class="reference internal" href="/native- client/devguide/devcycle/building.html"><em>Building Native Client Modules</em>< /a></p> 30 this document, we recommend reading <a class="reference internal" href="/native- client/devguide/devcycle/building.html"><em>Building Native Client Modules</em>< /a></p>
32 <section id="c-standard-libraries-glibc-and-newlib"> 31 <h3 id="c-standard-libraries-glibc-and-newlib"><span id="c-libraries"></span>C s tandard libraries: glibc and newlib</h3>
33 <span id="c-libraries"></span><h3 id="c-standard-libraries-glibc-and-newlib"><sp an id="c-libraries"></span>C standard libraries: glibc and newlib</h3>
34 <p>The Native Client SDK comes with two C standard libraries &#8212; glibc and 32 <p>The Native Client SDK comes with two C standard libraries &#8212; glibc and
35 newlib. These libraries are described in the table below.</p> 33 newlib. These libraries are described in the table below.</p>
36 <table border="1" class="docutils"> 34 <table border="1" class="docutils">
37 <colgroup> 35 <colgroup>
38 </colgroup> 36 </colgroup>
39 <thead valign="bottom"> 37 <thead valign="bottom">
40 <tr class="row-odd"><th class="head">Library</th> 38 <tr class="row-odd"><th class="head">Library</th>
41 <th class="head">Linking</th> 39 <th class="head">Linking</th>
42 <th class="head">License</th> 40 <th class="head">License</th>
43 <th class="head">Description</th> 41 <th class="head">Description</th>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 the differences between newlib and glibc, and the choice you must make 114 the differences between newlib and glibc, and the choice you must make
117 between the two libraries.</strong></li> 115 between the two libraries.</strong></li>
118 <li>Static linking with glibc is rarely used. Use this feature with caution.</li > 116 <li>Static linking with glibc is rarely used. Use this feature with caution.</li >
119 <li>The standard C++ runtime in Native Client is provided by libstdc++; this 117 <li>The standard C++ runtime in Native Client is provided by libstdc++; this
120 library is independent from and layered on top of glibc. Because of 118 library is independent from and layered on top of glibc. Because of
121 licensing restrictions, libstdc++ must be statically linked for commercial 119 licensing restrictions, libstdc++ must be statically linked for commercial
122 uses, even if the rest of an application is dynamically linked.</li> 120 uses, even if the rest of an application is dynamically linked.</li>
123 </ul> 121 </ul>
124 122
125 </aside> 123 </aside>
126 </section><section id="sdk-toolchains">
127 <h3 id="sdk-toolchains">SDK toolchains</h3> 124 <h3 id="sdk-toolchains">SDK toolchains</h3>
128 <p>The Native Client SDK contains multiple toolchains, which are differentiated by 125 <p>The Native Client SDK contains multiple toolchains, which are differentiated by
129 <a class="reference internal" href="/native-client/devguide/devcycle/building.ht ml#target-architectures"><em>target architecture</em></a> and C library:</p> 126 <a class="reference internal" href="/native-client/devguide/devcycle/building.ht ml#target-architectures"><em>target architecture</em></a> and C library:</p>
130 <table border="1" class="docutils"> 127 <table border="1" class="docutils">
131 <colgroup> 128 <colgroup>
132 </colgroup> 129 </colgroup>
133 <thead valign="bottom"> 130 <thead valign="bottom">
134 <tr class="row-odd"><th class="head">Target architecture</th> 131 <tr class="row-odd"><th class="head">Target architecture</th>
135 <th class="head">C library</th> 132 <th class="head">C library</th>
136 <th class="head">Toolchain directory</th> 133 <th class="head">Toolchain directory</th>
(...skipping 21 matching lines...) Expand all
158 <p>In the directories listed above, &lt;platform&gt; is the platform of your dev elopment 155 <p>In the directories listed above, &lt;platform&gt; is the platform of your dev elopment
159 machine (i.e., win, mac, or linux). For example, in the Windows SDK, the x86 156 machine (i.e., win, mac, or linux). For example, in the Windows SDK, the x86
160 toolchain that uses glibc is in <code>toolchain/win_x86_glibc</code>.</p> 157 toolchain that uses glibc is in <code>toolchain/win_x86_glibc</code>.</p>
161 <aside class="note"> 158 <aside class="note">
162 <strong>Note:</strong> The ARM and PNaCl toolchains are currently restricted to newlib. 159 <strong>Note:</strong> The ARM and PNaCl toolchains are currently restricted to newlib.
163 </aside> 160 </aside>
164 <p>To use the glibc library and dynamic linking in your application, you <strong >must</strong> 161 <p>To use the glibc library and dynamic linking in your application, you <strong >must</strong>
165 use a glibc toolchain. (Currently the only glibc toolchain is 162 use a glibc toolchain. (Currently the only glibc toolchain is
166 <code>&lt;platform&gt;_x86_glibc</code>.) Note that you must build all code in y our application 163 <code>&lt;platform&gt;_x86_glibc</code>.) Note that you must build all code in y our application
167 with one toolchain. Code from multiple toolchains cannot be mixed.</p> 164 with one toolchain. Code from multiple toolchains cannot be mixed.</p>
168 </section><section id="specifying-and-delivering-shared-libraries">
169 <h3 id="specifying-and-delivering-shared-libraries">Specifying and delivering sh ared libraries</h3> 165 <h3 id="specifying-and-delivering-shared-libraries">Specifying and delivering sh ared libraries</h3>
170 <p>One significant difference between newlib and glibc applications is that glib c 166 <p>One significant difference between newlib and glibc applications is that glib c
171 applications must explicitly list and deploy the shared libraries that they 167 applications must explicitly list and deploy the shared libraries that they
172 use.</p> 168 use.</p>
173 <p>In a desktop environment, when the user launches a dynamically linked 169 <p>In a desktop environment, when the user launches a dynamically linked
174 application, the operating system&#8217;s program loader determines the set of 170 application, the operating system&#8217;s program loader determines the set of
175 libraries the application requires by reading explicit inter-module 171 libraries the application requires by reading explicit inter-module
176 dependencies from executable file headers, and loads the required libraries 172 dependencies from executable file headers, and loads the required libraries
177 into the address space of the application process. Typically the required 173 into the address space of the application process. Typically the required
178 libraries will have been installed on the system as a part of the application&#8 217;s 174 libraries will have been installed on the system as a part of the application&#8 217;s
179 installation process. Often the desktop application developer doesn&#8217;t know or 175 installation process. Often the desktop application developer doesn&#8217;t know or
180 think about the libraries that are required by an application, as those details 176 think about the libraries that are required by an application, as those details
181 are taken care of by the user&#8217;s operating system.</p> 177 are taken care of by the user&#8217;s operating system.</p>
182 <p>In the Native Client sandbox, dynamic linking can&#8217;t rely in the same wa y on the 178 <p>In the Native Client sandbox, dynamic linking can&#8217;t rely in the same wa y on the
183 operating system or the local file system. Instead, the application developer 179 operating system or the local file system. Instead, the application developer
184 must identify the set of libraries that are required by an application, list 180 must identify the set of libraries that are required by an application, list
185 those libraries in a Native Client <a class="reference internal" href="/native-c lient/devguide/coding/application-structure.html#manifest-file"><em>manifest fil e</em></a>, and 181 those libraries in a Native Client <a class="reference internal" href="/native-c lient/devguide/coding/application-structure.html#manifest-file"><em>manifest fil e</em></a>, and
186 deploy the libraries along with the application. Instructions for how to build 182 deploy the libraries along with the application. Instructions for how to build
187 a dynamically linked Native Client application, generate a Native Client 183 a dynamically linked Native Client application, generate a Native Client
188 manifest (.nmf) file, and deploy an application are provided below.</p> 184 manifest (.nmf) file, and deploy an application are provided below.</p>
189 </section></section><section id="building-a-dynamically-linked-application">
190 <h2 id="building-a-dynamically-linked-application">Building a dynamically linked application</h2> 185 <h2 id="building-a-dynamically-linked-application">Building a dynamically linked application</h2>
191 <p>Applications built with the glibc toolchain will by dynamically linked by 186 <p>Applications built with the glibc toolchain will by dynamically linked by
192 default. Application that load shared libraries at runtime using <code>dlopen()< /code> 187 default. Application that load shared libraries at runtime using <code>dlopen()< /code>
193 must link with the libdl library (<code>-ldl</code>).</p> 188 must link with the libdl library (<code>-ldl</code>).</p>
194 <p>Like other gcc-based toolchains building a dynamic library for NaCl is normal ly 189 <p>Like other gcc-based toolchains building a dynamic library for NaCl is normal ly
195 done by linking with the <code>-shared</code> flag and compiling with the <code> -fPIC</code> flag. 190 done by linking with the <code>-shared</code> flag and compiling with the <code> -fPIC</code> flag.
196 The SDK build system will do this automatically when the <code>SO_RULE</code> Ma kefile 191 The SDK build system will do this automatically when the <code>SO_RULE</code> Ma kefile
197 rule is used.</p> 192 rule is used.</p>
198 <p>The Native Client SDK includes an example that demonstrates how to build a 193 <p>The Native Client SDK includes an example that demonstrates how to build a
199 shared library, and how to use the <code>dlopen()</code> interface to load that library 194 shared library, and how to use the <code>dlopen()</code> interface to load that library
(...skipping 27 matching lines...) Expand all
227 <aside class="note"> 222 <aside class="note">
228 <strong>Note:</strong> The Makefiles for most of the examples in the SDK build t he 223 <strong>Note:</strong> The Makefiles for most of the examples in the SDK build t he
229 examples using multiple toolchains (x86 newlib, x86 glibc, ARM, and PNaCl). 224 examples using multiple toolchains (x86 newlib, x86 glibc, ARM, and PNaCl).
230 With a few exceptions (listed in the <a class="reference internal" href="/native -client/sdk/release-notes.html#sdk-release-notes"><em>Release Notes</em></a>), r unning &#8220;make&#8221; in each example&#8217;s directory builds 225 With a few exceptions (listed in the <a class="reference internal" href="/native -client/sdk/release-notes.html#sdk-release-notes"><em>Release Notes</em></a>), r unning &#8220;make&#8221; in each example&#8217;s directory builds
231 multiple versions of the example using the SDK toolchains. The dlopen example 226 multiple versions of the example using the SDK toolchains. The dlopen example
232 is one of those exceptions – it is only built with the x86 glibc toolchain, 227 is one of those exceptions – it is only built with the x86 glibc toolchain,
233 as that is currently the only toolchain that supports glibc and thus dynamic 228 as that is currently the only toolchain that supports glibc and thus dynamic
234 linking and loading. Take a look at the example Makefiles and the generated 229 linking and loading. Take a look at the example Makefiles and the generated
235 .nmf files for details on how to build dynamically linked applications. 230 .nmf files for details on how to build dynamically linked applications.
236 </aside> 231 </aside>
237 </section><section id="generating-a-native-client-manifest-file-for-a-dynamicall y-linked-application"> 232 <h2 id="generating-a-native-client-manifest-file-for-a-dynamically-linked-applic ation"><span id="dynamic-loading-manifest"></span>Generating a Native Client man ifest file for a dynamically linked application</h2>
238 <span id="dynamic-loading-manifest"></span><h2 id="generating-a-native-client-ma nifest-file-for-a-dynamically-linked-application"><span id="dynamic-loading-mani fest"></span>Generating a Native Client manifest file for a dynamically linked a pplication</h2>
239 <p>The Native Client manifest file specifies the name of the executable to run 233 <p>The Native Client manifest file specifies the name of the executable to run
240 and must also specify any shared libraries that the application directly 234 and must also specify any shared libraries that the application directly
241 depends on. For indirect dependencies (such as libraries opened via 235 depends on. For indirect dependencies (such as libraries opened via
242 <code>dlopen()</code>) it is also convenient to list libraries in the manifest f ile. 236 <code>dlopen()</code>) it is also convenient to list libraries in the manifest f ile.
243 However it is possile to load arbitrary shared libraries at runtime that 237 However it is possile to load arbitrary shared libraries at runtime that
244 are not mentioned in the manifest by using the <a class="reference external" hre f="nacl_io">nacl_io library</a> 238 are not mentioned in the manifest by using the <a class="reference external" hre f="nacl_io">nacl_io library</a>
245 to mount a filesystem that contains the shared libraries which will then 239 to mount a filesystem that contains the shared libraries which will then
246 allow <code>dlopen()</code> to access them.</p> 240 allow <code>dlopen()</code> to access them.</p>
247 <p>In this example we demonstrate both loading directly from via the manifest 241 <p>In this example we demonstrate both loading directly from via the manifest
248 file (<code>libeightball.so</code>) and loading indirectly via a http mount 242 file (<code>libeightball.so</code>) and loading indirectly via a http mount
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 </dl> 299 </dl>
306 <aside class="note"> 300 <aside class="note">
307 <strong>Note:</strong> The <code>create_nmf</code> script can only automatically detect explicit 301 <strong>Note:</strong> The <code>create_nmf</code> script can only automatically detect explicit
308 shared library dependencies (for example, dependencies specified with the -l 302 shared library dependencies (for example, dependencies specified with the -l
309 flag for the compiler/linker). If you want to include libraries that you 303 flag for the compiler/linker). If you want to include libraries that you
310 intend to dlopen() at runtime you must explcitly list them in your call to 304 intend to dlopen() at runtime you must explcitly list them in your call to
311 <code>create_nmf</code>. 305 <code>create_nmf</code>.
312 </aside> 306 </aside>
313 <p>As an alternative to using <code>create_nmf</code>, it is possible to manuall y calculate 307 <p>As an alternative to using <code>create_nmf</code>, it is possible to manuall y calculate
314 the list of shared library dependencies using tools such as <code>objdump_</code >.</p> 308 the list of shared library dependencies using tools such as <code>objdump_</code >.</p>
315 </section><section id="deploying-a-dynamically-linked-application">
316 <h2 id="deploying-a-dynamically-linked-application">Deploying a dynamically link ed application</h2> 309 <h2 id="deploying-a-dynamically-linked-application">Deploying a dynamically link ed application</h2>
317 <p>As described above, an application&#8217;s manifest file must explicitly list all the 310 <p>As described above, an application&#8217;s manifest file must explicitly list all the
318 executable code modules that the application directly depends on, including 311 executable code modules that the application directly depends on, including
319 modules from the application itself (.nexe and .so files), modules from the 312 modules from the application itself (.nexe and .so files), modules from the
320 Native Client SDK (e.g., libppapi_cpp.so), and perhaps also modules from 313 Native Client SDK (e.g., libppapi_cpp.so), and perhaps also modules from
321 <a class="reference external" href="http://code.google.com/p/naclports/">naclpor ts</a> or from 314 <a class="reference external" href="http://code.google.com/p/naclports/">naclpor ts</a> or from
322 <a class="reference external" href="../../community/middleware">middleware syste ms</a> that 315 <a class="reference external" href="../../community/middleware">middleware syste ms</a> that
323 the application uses. You must provide all of those modules as part of the 316 the application uses. You must provide all of those modules as part of the
324 application deployment process.</p> 317 application deployment process.</p>
325 <p>As explained in <a class="reference internal" href="/native-client/devguide/d istributing.html"><em>Distributing Your Application</em></a>, there are two basi c ways to deploy an application:</p> 318 <p>As explained in <a class="reference internal" href="/native-client/devguide/d istributing.html"><em>Distributing Your Application</em></a>, there are two basi c ways to deploy an application:</p>
(...skipping 11 matching lines...) Expand all
337 in the Native Client manifest file, and be named relative to the location of 330 in the Native Client manifest file, and be named relative to the location of
338 the manifest file. Remember that some of the libraries named in the manifest 331 the manifest file. Remember that some of the libraries named in the manifest
339 file may be located in directories you specified with the -L option to 332 file may be located in directories you specified with the -L option to
340 <code>create_nmf.py</code>. You are free to rename/rearrange files and directori es 333 <code>create_nmf.py</code>. You are free to rename/rearrange files and directori es
341 referenced by the Native Client manifest file, so long as the modules are 334 referenced by the Native Client manifest file, so long as the modules are
342 available in the locations indicated by the manifest file. If you move or 335 available in the locations indicated by the manifest file. If you move or
343 rename modules, it may be easier to re-run <code>create_nmf.py</code> to generat e a new 336 rename modules, it may be easier to re-run <code>create_nmf.py</code> to generat e a new
344 manifest file rather than edit the original manifest file. For hosted 337 manifest file rather than edit the original manifest file. For hosted
345 applications, you can check for name mismatches during testing by watching the 338 applications, you can check for name mismatches during testing by watching the
346 request log of the web server hosting your test deployment.</p> 339 request log of the web server hosting your test deployment.</p>
347 </section><section id="opening-a-shared-library-at-runtime">
348 <h2 id="opening-a-shared-library-at-runtime">Opening a shared library at runtime </h2> 340 <h2 id="opening-a-shared-library-at-runtime">Opening a shared library at runtime </h2>
349 <p>Native Client supports a version of the POSIX standard <code>dlopen()</code> interface 341 <p>Native Client supports a version of the POSIX standard <code>dlopen()</code> interface
350 for opening libraries explicitly, after an application is already running. 342 for opening libraries explicitly, after an application is already running.
351 Calling <code>dlopen()</code> may cause a library download to occur, and automat ically 343 Calling <code>dlopen()</code> may cause a library download to occur, and automat ically
352 loads all libraries that are required by the named library.</p> 344 loads all libraries that are required by the named library.</p>
353 <aside class="note"> 345 <aside class="note">
354 <strong>Caution:</strong> Since <code>dlopen()</code> can potentially block, you must initially 346 <strong>Caution:</strong> Since <code>dlopen()</code> can potentially block, you must initially
355 call <code>dlopen()</code> off your application&#8217;s main thread. Initial cal ls to 347 call <code>dlopen()</code> off your application&#8217;s main thread. Initial cal ls to
356 <code>dlopen()</code> from the main thread will always fail in the current 348 <code>dlopen()</code> from the main thread will always fail in the current
357 implementation of Native Client. 349 implementation of Native Client.
(...skipping 17 matching lines...) Expand all
375 and makes calls to <code>Magic8Ball()</code> and <code>Reverse()</code> in respo nse to requests 367 and makes calls to <code>Magic8Ball()</code> and <code>Reverse()</code> in respo nse to requests
376 from JavaScript.</li> 368 from JavaScript.</li>
377 </ul> 369 </ul>
378 <p>When the Native Client module starts, it kicks off a worker thread that calls 370 <p>When the Native Client module starts, it kicks off a worker thread that calls
379 <code>dlopen()</code> to load the two shared libraries. Once the module has a ha ndle to 371 <code>dlopen()</code> to load the two shared libraries. Once the module has a ha ndle to
380 the library, it fetches the addresses of the <code>Magic8Ball()</code> and <code >Reverse()</code> 372 the library, it fetches the addresses of the <code>Magic8Ball()</code> and <code >Reverse()</code>
381 functions using <code>dlsym()</code>. When a user types in a query and clicks th e &#8216;ASK!&#8217; 373 functions using <code>dlsym()</code>. When a user types in a query and clicks th e &#8216;ASK!&#8217;
382 button, the module calls <code>Magic8Ball()</code> to generate an answer, and re turns 374 button, the module calls <code>Magic8Ball()</code> to generate an answer, and re turns
383 the result to the user. Likewise when the user clicks the &#8216;Reverse&#8217; button 375 the result to the user. Likewise when the user clicks the &#8216;Reverse&#8217; button
384 it calls the <code>Reverse()</code> function to reverse the string.</p> 376 it calls the <code>Reverse()</code> function to reverse the string.</p>
385 </section><section id="troubleshooting">
386 <h2 id="troubleshooting">Troubleshooting</h2> 377 <h2 id="troubleshooting">Troubleshooting</h2>
387 <p>If your .nexe isn&#8217;t loading, the best place to look for information tha t can 378 <p>If your .nexe isn&#8217;t loading, the best place to look for information tha t can
388 help you troubleshoot the JavaScript console and standard output from Chrome. 379 help you troubleshoot the JavaScript console and standard output from Chrome.
389 See <a class="reference internal" href="/native-client/devguide/devcycle/debuggi ng.html#devcycle-debugging"><em>Debugging</em></a> for more information.</p> 380 See <a class="reference internal" href="/native-client/devguide/devcycle/debuggi ng.html#devcycle-debugging"><em>Debugging</em></a> for more information.</p>
390 <p>Here are a few common error messages and explanations of what they mean:</p> 381 <p>Here are a few common error messages and explanations of what they mean:</p>
391 <dl class="docutils"> 382 <dl class="docutils">
392 <dt><strong>/main.nexe: error while loading shared libraries: /main.nexe: failed to allocate code and data space for executable</strong></dt> 383 <dt><strong>/main.nexe: error while loading shared libraries: /main.nexe: failed to allocate code and data space for executable</strong></dt>
393 <dd>The .nexe may not have been compiled correctly (e.g., the .nexe may be 384 <dd>The .nexe may not have been compiled correctly (e.g., the .nexe may be
394 statically linked). Try cleaning and recompiling with the glibc toolchain.</dd> 385 statically linked). Try cleaning and recompiling with the glibc toolchain.</dd>
395 <dt><strong>/main.nexe: error while loading shared libraries: libpthread.so.xxxx : cannot open shared object file: Permission denied</strong></dt> 386 <dt><strong>/main.nexe: error while loading shared libraries: libpthread.so.xxxx : cannot open shared object file: Permission denied</strong></dt>
(...skipping 16 matching lines...) Expand all
412 that was loaded.</dd> 403 that was loaded.</dd>
413 <dt><strong>/lib/main.nexe: error while loading shared libraries: /lib/main.nexe : only ET_DYN and ET_EXEC can be loaded</strong></dt> 404 <dt><strong>/lib/main.nexe: error while loading shared libraries: /lib/main.nexe : only ET_DYN and ET_EXEC can be loaded</strong></dt>
414 <dd>This error message indicates that there is an error with the .so files liste d 405 <dd>This error message indicates that there is an error with the .so files liste d
415 in the .nmf file &#8211; either the files are the wrong type or kind, or an 406 in the .nmf file &#8211; either the files are the wrong type or kind, or an
416 expected library is missing.</dd> 407 expected library is missing.</dd>
417 <dt><strong>undefined reference to &#8216;dlopen&#8217; collect2: ld returned 1 exit status</strong></dt> 408 <dt><strong>undefined reference to &#8216;dlopen&#8217; collect2: ld returned 1 exit status</strong></dt>
418 <dd>This is a linker ordering problem that usually results from improper orderin g 409 <dd>This is a linker ordering problem that usually results from improper orderin g
419 of command line flags when linking. Reconfigure your command line string to 410 of command line flags when linking. Reconfigure your command line string to
420 list libraries after the -o flag.</dd> 411 list libraries after the -o flag.</dd>
421 </dl> 412 </dl>
422 </section></section> 413 </section>
423 414
424 {{/partials.standard_nacl_article}} 415 {{/partials.standard_nacl_article}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698