| Index: native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html
|
| diff --git a/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html b/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html
|
| index 003a20d3d51c3268ade7f74da5864a31ea49e0f3..1123f9e91588216ffb5351b005813f57f1dfb0f9 100644
|
| --- a/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html
|
| +++ b/native_client_sdk/doc_generated/devguide/devcycle/dynamic-loading.html
|
| @@ -4,22 +4,20 @@
|
| <h1 id="dynamic-linking-and-loading-with-glibc">Dynamic Linking and Loading with glibc</h1>
|
| <div class="contents local" id="contents" style="display: none">
|
| <ul class="small-gap">
|
| -<li><p class="first"><a class="reference internal" href="#introduction" id="id1">Introduction</a></p>
|
| +<li><a class="reference internal" href="#c-standard-libraries-glibc-and-newlib" id="id1">C standard libraries: glibc and newlib</a></li>
|
| +<li><a class="reference internal" href="#sdk-toolchains" id="id2">SDK toolchains</a></li>
|
| +<li><p class="first"><a class="reference internal" href="#specifying-and-delivering-shared-libraries" id="id3">Specifying and delivering shared libraries</a></p>
|
| <ul class="small-gap">
|
| -<li><a class="reference internal" href="#c-standard-libraries-glibc-and-newlib" id="id2">C standard libraries: glibc and newlib</a></li>
|
| -<li><a class="reference internal" href="#sdk-toolchains" id="id3">SDK toolchains</a></li>
|
| -<li><a class="reference internal" href="#specifying-and-delivering-shared-libraries" id="id4">Specifying and delivering shared libraries</a></li>
|
| +<li><a class="reference internal" href="#building-a-dynamically-linked-application" id="id4">Building a dynamically linked application</a></li>
|
| +<li><a class="reference internal" href="#generating-a-native-client-manifest-file-for-a-dynamically-linked-application" id="id5">Generating a Native Client manifest file for a dynamically linked application</a></li>
|
| +<li><a class="reference internal" href="#deploying-a-dynamically-linked-application" id="id6">Deploying a dynamically linked application</a></li>
|
| +<li><a class="reference internal" href="#opening-a-shared-library-at-runtime" id="id7">Opening a shared library at runtime</a></li>
|
| +<li><a class="reference internal" href="#troubleshooting" id="id8">Troubleshooting</a></li>
|
| </ul>
|
| </li>
|
| -<li><a class="reference internal" href="#building-a-dynamically-linked-application" id="id5">Building a dynamically linked application</a></li>
|
| -<li><a class="reference internal" href="#generating-a-native-client-manifest-file-for-a-dynamically-linked-application" id="id6">Generating a Native Client manifest file for a dynamically linked application</a></li>
|
| -<li><a class="reference internal" href="#deploying-a-dynamically-linked-application" id="id7">Deploying a dynamically linked application</a></li>
|
| -<li><a class="reference internal" href="#opening-a-shared-library-at-runtime" id="id8">Opening a shared library at runtime</a></li>
|
| -<li><a class="reference internal" href="#troubleshooting" id="id9">Troubleshooting</a></li>
|
| </ul>
|
|
|
| -</div><h2 id="introduction">Introduction</h2>
|
| -<aside class="caution">
|
| +</div><aside class="caution">
|
| Portable Native Client currently only supports static linking, and the
|
| only C library available for it is newlib. This page is only valid for
|
| Native Client, though PNaCl will eventually support some form of
|
| @@ -28,7 +26,7 @@ dynamic linking.
|
| <p>This document describes how to create and deploy dynamically linked and loaded
|
| applications with the glibc library in the Native Client SDK. Before reading
|
| this document, we recommend reading <a class="reference internal" href="/native-client/devguide/devcycle/building.html"><em>Building Native Client Modules</em></a></p>
|
| -<h3 id="c-standard-libraries-glibc-and-newlib"><span id="c-libraries"></span>C standard libraries: glibc and newlib</h3>
|
| +<h2 id="c-standard-libraries-glibc-and-newlib"><span id="c-libraries"></span>C standard libraries: glibc and newlib</h2>
|
| <p>The Native Client SDK comes with two C standard libraries — glibc and
|
| newlib. These libraries are described in the table below.</p>
|
| <table border="1" class="docutils">
|
| @@ -38,11 +36,21 @@ newlib. These libraries are described in the table below.</p>
|
| <tr class="row-odd"><th class="head">Library</th>
|
| <th class="head">Linking</th>
|
| <th class="head">License</th>
|
| -<th class="head">Description</th>
|
| </tr>
|
| </thead>
|
| <tbody valign="top">
|
| -<tr class="row-even"><td>glibc</td>
|
| +<tr class="row-even"><td><dl class="first last docutils">
|
| +<dt>glibc</dt>
|
| +<dd>The GNU implementation of the <a class="reference external" href="http://en.wikipedia.org/wiki/POSIX">POSIX</a> standard
|
| +runtime library for the C programming language.
|
| +Designed for portability and performance, glibc is
|
| +one of the most popular implementations of the C
|
| +library. It is comprised of a set of interdependent
|
| +libraries including libc, libpthreads, libdl, and
|
| +others. For documentation, FAQs, and additional
|
| +information about glibc, see <a class="reference external" href="http://www.gnu.org/software/libc/index.html">GLIBC</a>.</dd>
|
| +</dl>
|
| +</td>
|
| <td>dynamic
|
| or static</td>
|
| <td>GNU Lesser
|
| @@ -50,18 +58,19 @@ General
|
| Public
|
| License
|
| (LGPL)</td>
|
| -<td>glibc is the GNU implementation of the
|
| -<a class="reference external" href="http://en.wikipedia.org/wiki/POSIX">POSIX</a> standard runtime library for the C
|
| -programming language. Designed for
|
| -portability and performance, glibc is one
|
| -of the most popular implementations of the
|
| -C library. It is comprised of a set of
|
| -interdependent libraries including libc,
|
| -libpthreads, libdl, and others. For
|
| -documentation, FAQs, and additional
|
| -information about glibc, see <a class="reference external" href="http://www.gnu.org/software/libc/index.html">GLIBC</a></td>
|
| </tr>
|
| -<tr class="row-odd"><td>newlib</td>
|
| +<tr class="row-odd"><td><dl class="first last docutils">
|
| +<dt>newlib</dt>
|
| +<dd>newlib is a C library intended for use in embedded
|
| +systems. Like glibc, newlib is a conglomeration of
|
| +several libraries. It is available for use under
|
| +BSD-type free software licenses, which generally
|
| +makes it more suitable to link statically in
|
| +commercial, closed-source applications. For
|
| +documentation, FAQs, and additional information
|
| +about newlib, see <a class="reference external" href="http://sourceware.org/newlib/">newlib</a>.</dd>
|
| +</dl>
|
| +</td>
|
| <td>static</td>
|
| <td>Berkeley
|
| Software
|
| @@ -70,16 +79,6 @@ Distribution
|
| free
|
| software
|
| licenses</td>
|
| -<td>newlib is a C library intended for use in
|
| -embedded systems. Like glibc, newlib is a
|
| -conglomeration of several library parts.
|
| -It is available for use under BSD-type free
|
| -software licenses, which generally makes it
|
| -more suitable to link statically in
|
| -commercial, closed-source applications. For
|
| -documentation, FAQs, and additional
|
| -information about newlib, see the <a class="reference external" href="http://sourceware.org/newlib/">newlib</a>
|
| -documentation.</td>
|
| </tr>
|
| </tbody>
|
| </table>
|
| @@ -127,7 +126,7 @@ uses, even if the rest of an application is dynamically linked.</li>
|
| </ul>
|
|
|
| </aside>
|
| -<h3 id="sdk-toolchains">SDK toolchains</h3>
|
| +<h2 id="sdk-toolchains">SDK toolchains</h2>
|
| <p>The Native Client SDK contains multiple toolchains, which are differentiated by
|
| <a class="reference internal" href="/native-client/devguide/devcycle/building.html#target-architectures"><em>target architecture</em></a> and C library:</p>
|
| <table border="1" class="docutils">
|
| @@ -168,7 +167,7 @@ toolchain that uses glibc is in <code>toolchain/win_x86_glibc</code>.</p>
|
| use a glibc toolchain. (Currently the only glibc toolchain is
|
| <code><platform>_x86_glibc</code>.) Note that you must build all code in your application
|
| with one toolchain. Code from multiple toolchains cannot be mixed.</p>
|
| -<h3 id="specifying-and-delivering-shared-libraries">Specifying and delivering shared libraries</h3>
|
| +<h2 id="specifying-and-delivering-shared-libraries">Specifying and delivering shared libraries</h2>
|
| <p>One significant difference between newlib and glibc applications is that glibc
|
| applications must explicitly list and deploy the shared libraries that they
|
| use.</p>
|
| @@ -188,7 +187,7 @@ those libraries in a Native Client <a class="reference internal" href="/native-c
|
| deploy the libraries along with the application. Instructions for how to build
|
| a dynamically linked Native Client application, generate a Native Client
|
| manifest (.nmf) file, and deploy an application are provided below.</p>
|
| -<h2 id="building-a-dynamically-linked-application">Building a dynamically linked application</h2>
|
| +<h3 id="building-a-dynamically-linked-application">Building a dynamically linked application</h3>
|
| <p>Applications built with the glibc toolchain will by dynamically linked by
|
| default. Application that load shared libraries at runtime using <code>dlopen()</code>
|
| must link with the libdl library (<code>-ldl</code>).</p>
|
| @@ -235,7 +234,7 @@ as that is currently the only toolchain that supports glibc and thus dynamic
|
| linking and loading. Take a look at the example Makefiles and the generated
|
| .nmf files for details on how to build dynamically linked applications.
|
| </aside>
|
| -<h2 id="generating-a-native-client-manifest-file-for-a-dynamically-linked-application"><span id="dynamic-loading-manifest"></span>Generating a Native Client manifest file for a dynamically linked application</h2>
|
| +<h3 id="generating-a-native-client-manifest-file-for-a-dynamically-linked-application"><span id="dynamic-loading-manifest"></span>Generating a Native Client manifest file for a dynamically linked application</h3>
|
| <p>The Native Client manifest file specifies the name of the executable to run
|
| and must also specify any shared libraries that the application directly
|
| depends on. For indirect dependencies (such as libraries opened via
|
| @@ -312,7 +311,7 @@ intend to dlopen() at runtime you must explcitly list them in your call to
|
| </aside>
|
| <p>As an alternative to using <code>create_nmf</code>, it is possible to manually calculate
|
| the list of shared library dependencies using tools such as <code>objdump_</code>.</p>
|
| -<h2 id="deploying-a-dynamically-linked-application">Deploying a dynamically linked application</h2>
|
| +<h3 id="deploying-a-dynamically-linked-application">Deploying a dynamically linked application</h3>
|
| <p>As described above, an application’s manifest file must explicitly list all the
|
| executable code modules that the application directly depends on, including
|
| modules from the application itself (.nexe and .so files), modules from the
|
| @@ -343,7 +342,7 @@ rename modules, it may be easier to re-run <code>create_nmf.py</code> to generat
|
| manifest file rather than edit the original manifest file. For hosted
|
| applications, you can check for name mismatches during testing by watching the
|
| request log of the web server hosting your test deployment.</p>
|
| -<h2 id="opening-a-shared-library-at-runtime">Opening a shared library at runtime</h2>
|
| +<h3 id="opening-a-shared-library-at-runtime">Opening a shared library at runtime</h3>
|
| <p>Native Client supports a version of the POSIX standard <code>dlopen()</code> interface
|
| for opening libraries explicitly, after an application is already running.
|
| Calling <code>dlopen()</code> may cause a library download to occur, and automatically
|
| @@ -380,7 +379,7 @@ functions using <code>dlsym()</code>. When a user types in a query and clicks th
|
| button, the module calls <code>Magic8Ball()</code> to generate an answer, and returns
|
| the result to the user. Likewise when the user clicks the ‘Reverse’ button
|
| it calls the <code>Reverse()</code> function to reverse the string.</p>
|
| -<h2 id="troubleshooting">Troubleshooting</h2>
|
| +<h3 id="troubleshooting">Troubleshooting</h3>
|
| <p>If your .nexe isn’t loading, the best place to look for information that can
|
| help you troubleshoot the JavaScript console and standard output from Chrome.
|
| See <a class="reference internal" href="/native-client/devguide/devcycle/debugging.html#devcycle-debugging"><em>Debugging</em></a> for more information.</p>
|
|
|