OLD | NEW |
1 ###################################### | 1 ###################################### |
2 Dynamic Linking and Loading with glibc | 2 Dynamic Linking and Loading with glibc |
3 ###################################### | 3 ###################################### |
4 | 4 |
5 .. contents:: | 5 .. contents:: |
6 :local: | 6 :local: |
7 :backlinks: none | 7 :backlinks: none |
8 :depth: 2 | 8 :depth: 2 |
9 | 9 |
10 .. Note:: | 10 .. Note:: |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 ``create_nmf``. | 301 ``create_nmf``. |
302 | 302 |
303 As an alternative to using ``create_nmf``, it is possible to manually calculate | 303 As an alternative to using ``create_nmf``, it is possible to manually calculate |
304 the list of shared library dependencies using tools such as ``objdump_``. | 304 the list of shared library dependencies using tools such as ``objdump_``. |
305 | 305 |
306 Deploying a dynamically linked application | 306 Deploying a dynamically linked application |
307 ========================================== | 307 ========================================== |
308 | 308 |
309 As described above, an application's manifest file must explicitly list all the | 309 As described above, an application's manifest file must explicitly list all the |
310 executable code modules that the application directly depends on, including | 310 executable code modules that the application directly depends on, including |
311 modules from the application itself (.nexe and .so files), modules from the | 311 modules from the application itself (``.nexe`` and ``.so`` files), modules from |
312 Native Client SDK (e.g., libppapi_cpp.so), and perhaps also modules from | 312 the Native Client SDK (e.g., ``libppapi_cpp.so``), and perhaps also modules from |
313 `naclports <http://code.google.com/p/naclports/>`_ or from | 313 `naclports <http://code.google.com/p/naclports/>`_ or from `middleware systems |
314 `middleware systems <../../community/middleware>`_ that | 314 <../../community/middleware>`_ that the application uses. You must provide all |
315 the application uses. You must provide all of those modules as part of the | 315 of those modules as part of the application deployment process. |
316 application deployment process. | |
317 | 316 |
318 As explained in :doc:`Distributing Your Application | 317 As explained in :doc:`Distributing Your Application <../distributing>`, there |
319 <../distributing>`, there are two basic ways to deploy an application: | 318 are two basic ways to deploy a `Chrome app </apps>`_: |
320 | 319 |
321 * **hosted application:** all modules are hosted together on a web server of | 320 * **hosted application:** all modules are hosted together on a web server of |
322 your choice | 321 your choice |
323 | 322 |
324 * **packaged application:** all modules are packaged into one file, hosted in | 323 * **packaged application:** all modules are packaged into one file, hosted in |
325 the Chrome Web Store, and downloaded to the user's machine | 324 the Chrome Web Store, and downloaded to the user's machine |
326 | 325 |
| 326 The web store documentation contains a handy guide to `help you choose which to |
| 327 use <https://developer.chrome.com/webstore/choosing>`_. |
| 328 |
327 You must deploy all the modules listed in your application's manifest file for | 329 You must deploy all the modules listed in your application's manifest file for |
328 either the hosted application or the packaged application case. For hosted | 330 either the hosted application or the packaged application case. For hosted |
329 applications, you must upload the modules to your web server. For packaged | 331 applications, you must upload the modules to your web server. For packaged |
330 applications, you must include the modules in the application's Chrome Web | 332 applications, you must include the modules in the application's Chrome Web Store |
331 Store .crx file. Modules should use URLs/names that are consistent with those | 333 .crx file. Modules should use URLs/names that are consistent with those in the |
332 in the Native Client manifest file, and be named relative to the location of | 334 Native Client manifest file, and be named relative to the location of the |
333 the manifest file. Remember that some of the libraries named in the manifest | 335 manifest file. Remember that some of the libraries named in the manifest file |
334 file may be located in directories you specified with the -L option to | 336 may be located in directories you specified with the ``-L`` option to |
335 ``create_nmf.py``. You are free to rename/rearrange files and directories | 337 ``create_nmf.py``. You are free to rename/rearrange files and directories |
336 referenced by the Native Client manifest file, so long as the modules are | 338 referenced by the Native Client manifest file, so long as the modules are |
337 available in the locations indicated by the manifest file. If you move or | 339 available in the locations indicated by the manifest file. If you move or rename |
338 rename modules, it may be easier to re-run ``create_nmf.py`` to generate a new | 340 modules, it may be easier to re-run ``create_nmf.py`` to generate a new manifest |
339 manifest file rather than edit the original manifest file. For hosted | 341 file rather than edit the original manifest file. For hosted applications, you |
340 applications, you can check for name mismatches during testing by watching the | 342 can check for name mismatches during testing by watching the request log of the |
341 request log of the web server hosting your test deployment. | 343 web server hosting your test deployment. |
342 | 344 |
343 Opening a shared library at runtime | 345 Opening a shared library at runtime |
344 =================================== | 346 =================================== |
345 | 347 |
346 Native Client supports a version of the POSIX standard ``dlopen()`` interface | 348 Native Client supports a version of the POSIX standard ``dlopen()`` interface |
347 for opening libraries explicitly, after an application is already running. | 349 for opening libraries explicitly, after an application is already running. |
348 Calling ``dlopen()`` may cause a library download to occur, and automatically | 350 Calling ``dlopen()`` may cause a library download to occur, and automatically |
349 loads all libraries that are required by the named library. | 351 loads all libraries that are required by the named library. |
350 | 352 |
351 .. Note:: | 353 .. Note:: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 **undefined reference to 'dlopen' collect2: ld returned 1 exit status** | 429 **undefined reference to 'dlopen' collect2: ld returned 1 exit status** |
428 This is a linker ordering problem that usually results from improper ordering | 430 This is a linker ordering problem that usually results from improper ordering |
429 of command line flags when linking. Reconfigure your command line string to | 431 of command line flags when linking. Reconfigure your command line string to |
430 list libraries after the -o flag. | 432 list libraries after the -o flag. |
431 | 433 |
432 .. |menu-icon| image:: /images/menu-icon.png | 434 .. |menu-icon| image:: /images/menu-icon.png |
433 .. _objdump: http://en.wikipedia.org/wiki/Objdump | 435 .. _objdump: http://en.wikipedia.org/wiki/Objdump |
434 .. _GLIBC: http://www.gnu.org/software/libc/index.html | 436 .. _GLIBC: http://www.gnu.org/software/libc/index.html |
435 .. _POSIX: http://en.wikipedia.org/wiki/POSIX | 437 .. _POSIX: http://en.wikipedia.org/wiki/POSIX |
436 .. _newlib: http://sourceware.org/newlib/ | 438 .. _newlib: http://sourceware.org/newlib/ |
OLD | NEW |