OLD | NEW |
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> |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 This could significantly reduce download size and provide a further potential | 99 This could significantly reduce download size and provide a further potential |
100 performance benefit (for example, the hello_world example would only require | 100 performance benefit (for example, the hello_world example would only require |
101 downloading a .nexe file that’s on the order of 30KB, rather than a .nexe | 101 downloading a .nexe file that’s on the order of 30KB, rather than a .nexe |
102 file and several libraries, which are on the order of 1.5MB).</li> | 102 file and several libraries, which are on the order of 1.5MB).</li> |
103 </ul> | 103 </ul> |
104 <p>Native Client support for dynamic linking and loading is based on glibc. Thus
, | 104 <p>Native Client support for dynamic linking and loading is based on glibc. Thus
, |
105 <strong>if your Native Client application must dynamically link and load code (e
.g., | 105 <strong>if your Native Client application must dynamically link and load code (e
.g., |
106 due to licensing considerations), we recommend that you use the glibc | 106 due to licensing considerations), we recommend that you use the glibc |
107 library.</strong></p> | 107 library.</strong></p> |
108 <aside class="note"> | 108 <aside class="note"> |
109 <p><strong>Notes:</strong></p> | 109 <p><strong>Disclaimer:</strong></p> |
110 <ul class="small-gap"> | 110 <ul class="small-gap"> |
111 <li><strong>None of the above constitutes legal advice, or a description of the
legal | 111 <li><strong>None of the above constitutes legal advice, or a description of the
legal |
112 obligations you need to fulfill in order to be compliant with the LGPL or | 112 obligations you need to fulfill in order to be compliant with the LGPL or |
113 newlib licenses. The above description is only a technical explanation of | 113 newlib licenses. The above description is only a technical explanation of |
114 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 |
115 between the two libraries.</strong></li> | 115 between the two libraries.</strong></li> |
| 116 </ul> |
| 117 |
| 118 </aside> |
| 119 <aside class="note"> |
| 120 <p><strong>Notes:</strong></p> |
| 121 <ul class="small-gap"> |
116 <li>Static linking with glibc is rarely used. Use this feature with caution.</li
> | 122 <li>Static linking with glibc is rarely used. Use this feature with caution.</li
> |
117 <li>The standard C++ runtime in Native Client is provided by libstdc++; this | 123 <li>The standard C++ runtime in Native Client is provided by libstdc++; this |
118 library is independent from and layered on top of glibc. Because of | 124 library is independent from and layered on top of glibc. Because of |
119 licensing restrictions, libstdc++ must be statically linked for commercial | 125 licensing restrictions, libstdc++ must be statically linked for commercial |
120 uses, even if the rest of an application is dynamically linked.</li> | 126 uses, even if the rest of an application is dynamically linked.</li> |
121 </ul> | 127 </ul> |
122 | 128 |
123 </aside> | 129 </aside> |
124 <h3 id="sdk-toolchains">SDK toolchains</h3> | 130 <h3 id="sdk-toolchains">SDK toolchains</h3> |
125 <p>The Native Client SDK contains multiple toolchains, which are differentiated
by | 131 <p>The Native Client SDK contains multiple toolchains, which are differentiated
by |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 in the .nmf file – either the files are the wrong type or kind, or an | 412 in the .nmf file – either the files are the wrong type or kind, or an |
407 expected library is missing.</dd> | 413 expected library is missing.</dd> |
408 <dt><strong>undefined reference to ‘dlopen’ collect2: ld returned 1
exit status</strong></dt> | 414 <dt><strong>undefined reference to ‘dlopen’ collect2: ld returned 1
exit status</strong></dt> |
409 <dd>This is a linker ordering problem that usually results from improper orderin
g | 415 <dd>This is a linker ordering problem that usually results from improper orderin
g |
410 of command line flags when linking. Reconfigure your command line string to | 416 of command line flags when linking. Reconfigure your command line string to |
411 list libraries after the -o flag.</dd> | 417 list libraries after the -o flag.</dd> |
412 </dl> | 418 </dl> |
413 </section> | 419 </section> |
414 | 420 |
415 {{/partials.standard_nacl_article}} | 421 {{/partials.standard_nacl_article}} |
OLD | NEW |