Debian Codegraph @

po/pt_BR/man3/dlopen.3.po

raw
1 # Brazilian Portuguese translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Paulo César Mendes <[email protected]>, 2000.
5 # André Luiz Fassone <[email protected]>, 2000.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:22+0200\n"
10 "PO-Revision-Date: 2000-06-02 19:20-0300\n"
11 "Last-Translator: André Luiz Fassone <[email protected]>\n"
12 "Language-Team: Brazilian Portuguese <debian-l10n-"
13 "[email protected]>\n"
14 "Language: pt_BR\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19 "X-Generator: Virtaal 1.0.0-beta1\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "dlopen"
26 msgstr "dlopen"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 fevereiro 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, fuzzy, no-wrap
38 #| msgid "Linux man-pages 6.17"
39 msgid "Linux man-pages 6.18"
40 msgstr "Linux man-pages 6.17"
41
42 #. type: SH
43 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
44 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
45 #, no-wrap
46 msgid "NAME"
47 msgstr "NOME"
48
49 #. type: Plain text
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 msgid "dlclose, dlopen, dlmopen - open and close a shared object"
53 msgstr ""
54
55 #. type: SH
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 #, no-wrap
59 msgid "LIBRARY"
60 msgstr "BIBLIOTECA"
61
62 #. type: Plain text
63 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
64 #: opensuse-leap-16-1 opensuse-tumbleweed
65 #, fuzzy
66 #| msgid "Math library (I<libm>, I<-lm>)"
67 msgid "Dynamic linking library (I<libdl>,\\ I<-ldl>)"
68 msgstr "Biblioteca matemática (I<libm>, I<-lm>)"
69
70 #. type: SH
71 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
72 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
73 #, no-wrap
74 msgid "SYNOPSIS"
75 msgstr "SINOPSE"
76
77 #. type: Plain text
78 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
79 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
80 #, no-wrap
81 msgid "B<#include E<lt>dlfcn.hE<gt>>\n"
82 msgstr "B<#include E<lt>dlfcn.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
86 #: opensuse-tumbleweed
87 #, fuzzy, no-wrap
88 #| msgid ""
89 #| "B<void *dlopen(const char *>I<filename>B<, int >I<flags>B<);>\n"
90 #| "B<int dlclose(void *>I<handle>B<);>\n"
91 msgid ""
92 "B<void *dlopen(const char *>I<path>B<, int >I<flags>B<);>\n"
93 "B<int dlclose(void *>I<handle>B<);>\n"
94 msgstr ""
95 "B<void *dlopen(const char *>I<filename>B<, int >I<flags>B<);>\n"
96 "B<int dlclose(void *>I<handle>B<);>\n"
97
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 #, no-wrap
102 msgid "B<#define _GNU_SOURCE>\n"
103 msgstr "B<#define _GNU_SOURCE>\n"
104
105 #. type: Plain text
106 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
107 #: opensuse-tumbleweed
108 #, fuzzy, no-wrap
109 #| msgid "B<void *dlmopen(Lmid_t >I<lmid>B<, const char *>I<filename>B<, int >I<flags>B<);>\n"
110 msgid "B<void *dlmopen(Lmid_t >I<lmid>B<, const char *>I<path>B<, int >I<flags>B<);>\n"
111 msgstr "B<void *dlmopen(Lmid_t >I<lmid>B<, const char *>I<filename>B<, int >I<flags>B<);>\n"
112
113 #. type: SH
114 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
115 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
116 #, no-wrap
117 msgid "DESCRIPTION"
118 msgstr "DESCRIÇÃO"
119
120 #. type: SS
121 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
122 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
123 #, no-wrap
124 msgid "dlopen()"
125 msgstr "dlopen()"
126
127 #. type: Plain text
128 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
129 #: opensuse-tumbleweed
130 #, fuzzy
131 #| msgid ""
132 #| "B<dlopen> loads a dynamic library from the file named by the null "
133 #| "terminated string I<filename> and returns an opaque \"handle\" for the "
134 #| "dynamic library. If I<filename> is not an absolute path (i.e., it does "
135 #| "not begin with a \"/\"), then the file is searched for in the following "
136 #| "locations:"
137 msgid ""
138 "The function B<dlopen>() loads the dynamic shared object (shared library) "
139 "file named by the null-terminated string I<path> and returns an opaque "
140 "\"handle\" for the loaded object. This handle is employed with other "
141 "functions in the dlopen API, such as B<dlsym>(3), B<dladdr>(3), "
142 "B<dlinfo>(3), and B<dlclose>()."
143 msgstr ""
144 "B<dlopen> carrega uma biblioteca dinâmica do arquivo designado pela "
145 "sequência I<filename> e retorna um manipulador (handle) para a biblioteca. "
146 "Se I<filename> não for um caminho absoluto (não começar com '/'), o arquivo "
147 "será procurado nos seguintes locais:"
148
149 #. FIXME On Solaris, when handle is NULL, we seem to get back
150 #. a handle for (something like) the root of the namespace.
151 #. The point here is that if we do a dlmopen(LM_ID_NEWLM), then
152 #. the path==NULL case returns a different handle than
153 #. in the initial namespace. But, on glibc, the same handle is
154 #. returned. This is probably a bug in glibc.
155 #. type: Plain text
156 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
157 #: opensuse-tumbleweed
158 msgid ""
159 "If I<path> is NULL, then the returned handle is for the main program. If "
160 "I<path> contains a slash (\"/\"), then it is interpreted as a (relative or "
161 "absolute) pathname. Otherwise, the dynamic linker searches for the object "
162 "as follows (see B<ld.so>(8) for further details):"
163 msgstr ""
164
165 #. type: IP
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 #, no-wrap
169 msgid "\\[bu]"
170 msgstr "\\[bu]"
171
172 #. type: Plain text
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 msgid ""
176 "(ELF only) If the calling object (i.e., the shared library or executable "
177 "from which B<dlopen>() is called) contains a DT_RPATH tag, and does not "
178 "contain a DT_RUNPATH tag, then the directories listed in the DT_RPATH tag "
179 "are searched."
180 msgstr ""
181
182 #. type: Plain text
183 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
184 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
185 msgid ""
186 "If, at the time that the program was started, the environment variable "
187 "B<LD_LIBRARY_PATH> was defined to contain a colon-separated list of "
188 "directories, then these are searched. (As a security measure, this variable "
189 "is ignored for set-user-ID and set-group-ID programs.)"
190 msgstr ""
191
192 #. type: Plain text
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 msgid ""
196 "(ELF only) If the calling object contains a DT_RUNPATH tag, then the "
197 "directories listed in that tag are searched."
198 msgstr ""
199
200 #. type: Plain text
201 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
202 #: opensuse-tumbleweed
203 msgid ""
204 "The cache file I</etc/ld.so.cache> (maintained by B<ldconfig>(8)) is "
205 "checked to see whether it contains an entry for I<path>."
206 msgstr ""
207
208 #. type: Plain text
209 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
210 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
211 msgid "The directories I</lib> and I</usr/lib> are searched (in that order)."
212 msgstr ""
213
214 #. type: Plain text
215 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
216 #: opensuse-tumbleweed
217 msgid ""
218 "If the object specified by I<path> has dependencies on other shared objects, "
219 "then these are also automatically loaded by the dynamic linker using the "
220 "same rules. (This process may occur recursively, if those objects in turn "
221 "have dependencies, and so on.)"
222 msgstr ""
223
224 #. type: Plain text
225 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
226 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
227 msgid "One of the following two values must be included in I<flags>:"
228 msgstr ""
229
230 #. type: TP
231 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
232 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
233 #, no-wrap
234 msgid "B<RTLD_LAZY>"
235 msgstr "B<RTLD_LAZY>"
236
237 #. commit 12b5b6b7f78ea111e89bbf638294a5413c791072
238 #. type: Plain text
239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
241 msgid ""
242 "Perform lazy binding. Resolve symbols only as the code that references them "
243 "is executed. If the symbol is never referenced, then it is never resolved. "
244 "(Lazy binding is performed only for function references; references to "
245 "variables are always immediately bound when the shared object is loaded.) "
246 "Since glibc 2.1.1, this flag is overridden by the effect of the "
247 "B<LD_BIND_NOW> environment variable."
248 msgstr ""
249
250 #. type: TP
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 #, no-wrap
254 msgid "B<RTLD_NOW>"
255 msgstr "B<RTLD_NOW>"
256
257 #. type: Plain text
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 msgid ""
261 "If this value is specified, or the environment variable B<LD_BIND_NOW> is "
262 "set to a nonempty string, all undefined symbols in the shared object are "
263 "resolved before B<dlopen>() returns. If this cannot be done, an error is "
264 "returned."
265 msgstr ""
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid "Zero or more of the following values may also be ORed in I<flags>:"
271 msgstr ""
272
273 #. type: TP
274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
276 #, no-wrap
277 msgid "B<RTLD_GLOBAL>"
278 msgstr "B<RTLD_GLOBAL>"
279
280 #. type: Plain text
281 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
282 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
283 msgid ""
284 "The symbols defined by this shared object will be made available for symbol "
285 "resolution of subsequently loaded shared objects."
286 msgstr ""
287
288 #. type: TP
289 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
290 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
291 #, no-wrap
292 msgid "B<RTLD_LOCAL>"
293 msgstr "B<RTLD_LOCAL>"
294
295 #. type: Plain text
296 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
297 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
298 msgid ""
299 "This is the converse of B<RTLD_GLOBAL>, and the default if neither flag is "
300 "specified. Symbols defined in this shared object are not made available to "
301 "resolve references in subsequently loaded shared objects."
302 msgstr ""
303
304 #. type: TP
305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
307 #, no-wrap
308 msgid "B<RTLD_NODELETE> (since glibc 2.2)"
309 msgstr "B<RTLD_NODELETE> (desde o glibc 2.2)"
310
311 #. type: Plain text
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 msgid ""
315 "Do not unload the shared object during B<dlclose>(). Consequently, the "
316 "object's static and global variables are not reinitialized if the object is "
317 "reloaded with B<dlopen>() at a later time."
318 msgstr ""
319
320 #. type: TP
321 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
322 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
323 #, no-wrap
324 msgid "B<RTLD_NOLOAD> (since glibc 2.2)"
325 msgstr "B<RTLD_NOLOAD> (desde o glibc 2.2)"
326
327 #. type: Plain text
328 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
329 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
330 msgid ""
331 "Don't load the shared object. This can be used to test if the object is "
332 "already resident (B<dlopen>() returns NULL if it is not, or the object's "
333 "handle if it is resident). This flag can also be used to promote the flags "
334 "on a shared object that is already loaded. For example, a shared object "
335 "that was previously loaded with B<RTLD_LOCAL> can be reopened with "
336 "B<RTLD_NOLOAD\\ |\\ RTLD_GLOBAL>."
337 msgstr ""
338
339 #. type: TP
340 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
341 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
342 #, no-wrap
343 msgid "B<RTLD_DEEPBIND> (since glibc 2.3.4)"
344 msgstr "B<RTLD_DEEPBIND> (desde o glibc 2.3.4)"
345
346 #. Inimitably described by UD in
347 #. http://sources.redhat.com/ml/libc-hacker/2004-09/msg00083.html.
348 #. type: Plain text
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 msgid ""
352 "Place the lookup scope of the symbols in this shared object ahead of the "
353 "global scope. This means that a self-contained object will use its own "
354 "symbols in preference to global symbols with the same name contained in "
355 "objects that have already been loaded."
356 msgstr ""
357
358 #. type: Plain text
359 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
360 #: opensuse-tumbleweed
361 msgid ""
362 "If I<path> is NULL, then the returned handle is for the main program. When "
363 "given to B<dlsym>(3), this handle causes a search for a symbol in the main "
364 "program, followed by all shared objects loaded at program startup, and then "
365 "all shared objects loaded by B<dlopen>() with the flag B<RTLD_GLOBAL>."
366 msgstr ""
367
368 #. type: Plain text
369 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
370 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
371 msgid ""
372 "Symbol references in the shared object are resolved using (in order): "
373 "symbols in the link map of objects loaded for the main program and its "
374 "dependencies; symbols in shared objects (and their dependencies) that were "
375 "previously opened with B<dlopen>() using the B<RTLD_GLOBAL> flag; and "
376 "definitions in the shared object itself (and any dependencies that were "
377 "loaded for that object)."
378 msgstr ""
379
380 #. type: Plain text
381 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
382 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
383 msgid ""
384 "Any global symbols in the executable that were placed into its dynamic "
385 "symbol table by B<ld>(1) can also be used to resolve references in a "
386 "dynamically loaded shared object. Symbols may be placed in the dynamic "
387 "symbol table either because the executable was linked with the flag \"-"
388 "rdynamic\" (or, synonymously, \"--export-dynamic\"), which causes all of the "
389 "executable's global symbols to be placed in the dynamic symbol table, or "
390 "because B<ld>(1) noted a dependency on a symbol in another object during "
391 "static linking."
392 msgstr ""
393
394 #. type: Plain text
395 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
396 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
397 msgid ""
398 "If the same shared object is opened again with B<dlopen>(), the same object "
399 "handle is returned. The dynamic linker maintains reference counts for "
400 "object handles, so a dynamically loaded shared object is not deallocated "
401 "until B<dlclose>() has been called on it as many times as B<dlopen>() has "
402 "succeeded on it. Constructors (see below) are called only when the object "
403 "is actually loaded into memory (i.e., when the reference count increases to "
404 "1)."
405 msgstr ""
406
407 #. type: Plain text
408 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
409 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
410 msgid ""
411 "A subsequent B<dlopen>() call that loads the same shared object with "
412 "B<RTLD_NOW> may force symbol resolution for a shared object earlier loaded "
413 "with B<RTLD_LAZY>. Similarly, an object that was previously opened with "
414 "B<RTLD_LOCAL> can be promoted to B<RTLD_GLOBAL> in a subsequent B<dlopen>()."
415 msgstr ""
416
417 #. type: Plain text
418 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
419 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
420 msgid "If B<dlopen>() fails for any reason, it returns NULL."
421 msgstr ""
422
423 #. type: SS
424 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
425 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
426 #, no-wrap
427 msgid "dlmopen()"
428 msgstr "dlmopen()"
429
430 #. type: Plain text
431 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
432 #: opensuse-tumbleweed
433 msgid ""
434 "This function performs the same task as B<dlopen>()\\[em]the I<path> and "
435 "I<flags> arguments, as well as the return value, are the same, except for "
436 "the differences noted below."
437 msgstr ""
438
439 #. type: Plain text
440 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
441 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
442 msgid ""
443 "The B<dlmopen>() function differs from B<dlopen>() primarily in that it "
444 "accepts an additional argument, I<lmid>, that specifies the link-map list "
445 "(also referred to as a I<namespace>) in which the shared object should be "
446 "loaded. (By comparison, B<dlopen>() adds the dynamically loaded shared "
447 "object to the same namespace as the shared object from which the "
448 "B<dlopen>() call is made.) The I<Lmid_t> type is an opaque handle that "
449 "refers to a namespace."
450 msgstr ""
451
452 #. FIXME: Is using dlinfo() RTLD_DI_LMID the right technique?
453 #. type: Plain text
454 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
455 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
456 msgid ""
457 "The I<lmid> argument is either the ID of an existing namespace (which can be "
458 "obtained using the B<dlinfo>(3) B<RTLD_DI_LMID> request) or one of the "
459 "following special values:"
460 msgstr ""
461
462 #. type: TP
463 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
464 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
465 #, no-wrap
466 msgid "B<LM_ID_BASE>"
467 msgstr "B<LM_ID_BASE>"
468
469 #. type: Plain text
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 msgid ""
473 "Load the shared object in the initial namespace (i.e., the application's "
474 "namespace)."
475 msgstr ""
476
477 #. type: TP
478 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
479 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
480 #, no-wrap
481 msgid "B<LM_ID_NEWLM>"
482 msgstr "B<LM_ID_NEWLM>"
483
484 #. type: Plain text
485 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
486 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
487 msgid ""
488 "Create a new namespace and load the shared object in that namespace. The "
489 "object must have been correctly linked to reference all of the other shared "
490 "objects that it requires, since the new namespace is initially empty."
491 msgstr ""
492
493 #. type: Plain text
494 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
495 #: opensuse-tumbleweed
496 #, fuzzy
497 #| msgid ""
498 #| "If I<filename> is a NULL pointer, then the returned handle is for the "
499 #| "main program."
500 msgid ""
501 "If I<path> is NULL, then the only permitted value for I<lmid> is "
502 "B<LM_ID_BASE>."
503 msgstr "Se I<filename> for NULO, o manipulador designará o programa principal."
504
505 #. type: SS
506 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
507 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
508 #, no-wrap
509 msgid "dlclose()"
510 msgstr "dlclose()"
511
512 #. type: Plain text
513 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
514 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
515 msgid ""
516 "The function B<dlclose>() decrements the reference count on the dynamically "
517 "loaded shared object referred to by I<handle>."
518 msgstr ""
519
520 #. type: Plain text
521 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
522 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
523 msgid ""
524 "If the object's reference count drops to zero and no symbols in this object "
525 "are required by other objects, then the object is unloaded after first "
526 "calling any destructors defined for the object. (Symbols in this object "
527 "might be required in another object because this object was opened with the "
528 "B<RTLD_GLOBAL> flag and one of its symbols satisfied a relocation in another "
529 "object.)"
530 msgstr ""
531
532 #. type: Plain text
533 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
534 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
535 msgid ""
536 "All shared objects that were automatically loaded when B<dlopen>() was "
537 "invoked on the object referred to by I<handle> are recursively closed in the "
538 "same manner."
539 msgstr ""
540
541 #. type: Plain text
542 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
543 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
544 msgid ""
545 "A successful return from B<dlclose>() does not guarantee that the symbols "
546 "associated with I<handle> are removed from the caller's address space. In "
547 "addition to references resulting from explicit B<dlopen>() calls, a shared "
548 "object may have been implicitly loaded (and reference counted) because of "
549 "dependencies in other shared objects. Only when all references have been "
550 "released can the shared object be removed from the address space."
551 msgstr ""
552
553 #. type: SH
554 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
555 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
556 #, no-wrap
557 msgid "RETURN VALUE"
558 msgstr "VALOR DE RETORNO"
559
560 #. type: Plain text
561 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
562 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
563 msgid ""
564 "On success, B<dlopen>() and B<dlmopen>() return a non-NULL handle for the "
565 "loaded object. On error (file could not be found, was not readable, had the "
566 "wrong format, or caused errors during loading), these functions return NULL."
567 msgstr ""
568
569 #. type: Plain text
570 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
571 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
572 #, fuzzy
573 #| msgid ""
574 #| "On success, zero is returned. On error, -1 is returned, and I<errno> is "
575 #| "set appropriately."
576 msgid ""
577 "On success, B<dlclose>() returns 0; on error, it returns a nonzero value."
578 msgstr ""
579 "Em caso de sucesso, zero é retornado. Caso contrário, -1 é retornado, e "
580 "I<errno> é selecionado adequadamente."
581
582 #. type: Plain text
583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
585 msgid "Errors from these functions can be diagnosed using B<dlerror>(3)."
586 msgstr ""
587
588 #. type: SH
589 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
590 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
591 #, no-wrap
592 msgid "ATTRIBUTES"
593 msgstr "ATRIBUTOS"
594
595 #. type: Plain text
596 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
597 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
598 msgid ""
599 "For an explanation of the terms used in this section, see B<attributes>(7)."
600 msgstr ""
601 "Para uma explicação dos termos usados nesta seção, consulte B<attributes>(7)."
602
603 #. type: tbl table
604 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
605 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
606 #, no-wrap
607 msgid "Interface"
608 msgstr "Interface"
609
610 #. type: tbl table
611 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
612 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
613 #, no-wrap
614 msgid "Attribute"
615 msgstr "Atributo"
616
617 #. type: tbl table
618 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
619 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
620 #, no-wrap
621 msgid "Value"
622 msgstr "Valor"
623
624 #. type: tbl table
625 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
626 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
627 #, no-wrap
628 msgid ".na\n"
629 msgstr ".na\n"
630
631 #. type: tbl table
632 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
633 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
634 #, no-wrap
635 msgid ".nh\n"
636 msgstr ".nh\n"
637
638 #. type: tbl table
639 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
640 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
641 #, no-wrap
642 msgid ""
643 "B<dlopen>(),\n"
644 "B<dlmopen>(),\n"
645 "B<dlclose>()"
646 msgstr ""
647 "B<dlopen>(),\n"
648 "B<dlmopen>(),\n"
649 "B<dlclose>()"
650
651 #. type: tbl table
652 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
653 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
654 #, no-wrap
655 msgid "Thread safety"
656 msgstr "Thread safety"
657
658 #. type: tbl table
659 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
660 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
661 #, no-wrap
662 msgid "MT-Safe"
663 msgstr "MT-Safe"
664
665 #. type: SH
666 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
667 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
668 #, no-wrap
669 msgid "STANDARDS"
670 msgstr "PADRÕES"
671
672 #. type: TP
673 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
674 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
675 #, fuzzy, no-wrap
676 #| msgid "dlopen()"
677 msgid "B<dlopen>()"
678 msgstr "dlopen()"
679
680 #. type: TQ
681 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
682 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
683 #, fuzzy, no-wrap
684 #| msgid "B<close>(2)"
685 msgid "B<dlclose>()"
686 msgstr "B<close>(2)"
687
688 #. type: Plain text
689 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
690 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
691 msgid "POSIX.1-2008."
692 msgstr "POSIX.1-2008."
693
694 #. type: TP
695 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
696 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
697 #, fuzzy, no-wrap
698 #| msgid "dlmopen()"
699 msgid "B<dlmopen>()"
700 msgstr "dlmopen()"
701
702 #. type: TQ
703 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
704 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
705 #, fuzzy, no-wrap
706 #| msgid "B<RTLD_LOCAL>"
707 msgid "B<RTLD_NOLOAD>"
708 msgstr "B<RTLD_LOCAL>"
709
710 #. type: TQ
711 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
712 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
713 #, fuzzy, no-wrap
714 #| msgid "B<RTLD_NOW>"
715 msgid "B<RTLD_NODELETE>"
716 msgstr "B<RTLD_NOW>"
717
718 #. type: Plain text
719 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
720 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
721 msgid "GNU."
722 msgstr "GNU."
723
724 #. type: TP
725 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
726 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
727 #, fuzzy, no-wrap
728 #| msgid "B<RTLD_NOW>"
729 msgid "B<RTLD_DEEPBIND>"
730 msgstr "B<RTLD_NOW>"
731
732 #. type: Plain text
733 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
734 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
735 msgid "Solaris."
736 msgstr "Solaris."
737
738 #. type: SH
739 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
740 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
741 #, no-wrap
742 msgid "HISTORY"
743 msgstr "HISTÓRICO"
744
745 #. type: Plain text
746 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
747 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
748 msgid "glibc 2.0. POSIX.1-2001."
749 msgstr "glibc 2.0. POSIX.1-2001."
750
751 #. type: Plain text
752 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
753 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
754 msgid "glibc 2.3.4."
755 msgstr "glibc 2.3.4."
756
757 #. type: SH
758 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
759 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
760 #, no-wrap
761 msgid "NOTES"
762 msgstr "NOTAS"
763
764 #. type: SS
765 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
766 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
767 #, no-wrap
768 msgid "dlmopen() and namespaces"
769 msgstr ""
770
771 #. type: Plain text
772 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
773 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
774 msgid ""
775 "A link-map list defines an isolated namespace for the resolution of symbols "
776 "by the dynamic linker. Within a namespace, dependent shared objects are "
777 "implicitly loaded according to the usual rules, and symbol references are "
778 "likewise resolved according to the usual rules, but such resolution is "
779 "confined to the definitions provided by the objects that have been "
780 "(explicitly and implicitly) loaded into the namespace."
781 msgstr ""
782
783 #. type: Plain text
784 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
785 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
786 msgid ""
787 "The B<dlmopen>() function permits object-load isolation\\[em]the ability to "
788 "load a shared object in a new namespace without exposing the rest of the "
789 "application to the symbols made available by the new object. Note that the "
790 "use of the B<RTLD_LOCAL> flag is not sufficient for this purpose, since it "
791 "prevents a shared object's symbols from being available to I<any> other "
792 "shared object. In some cases, we may want to make the symbols provided by a "
793 "dynamically loaded shared object available to (a subset of) other shared "
794 "objects without exposing those symbols to the entire application. This can "
795 "be achieved by using a separate namespace and the B<RTLD_GLOBAL> flag."
796 msgstr ""
797
798 #. type: Plain text
799 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
800 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
801 msgid ""
802 "The B<dlmopen>() function also can be used to provide better isolation than "
803 "the B<RTLD_LOCAL> flag. In particular, shared objects loaded with "
804 "B<RTLD_LOCAL> may be promoted to B<RTLD_GLOBAL> if they are dependencies of "
805 "another shared object loaded with B<RTLD_GLOBAL>. Thus, B<RTLD_LOCAL> is "
806 "insufficient to isolate a loaded shared object except in the (uncommon) "
807 "case where one has explicit control over all shared object dependencies."
808 msgstr ""
809
810 #. type: Plain text
811 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
812 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
813 msgid ""
814 "Possible uses of B<dlmopen>() are plugins where the author of the plugin-"
815 "loading framework can't trust the plugin authors and does not wish any "
816 "undefined symbols from the plugin framework to be resolved to plugin "
817 "symbols. Another use is to load the same object more than once. Without "
818 "the use of B<dlmopen>(), this would require the creation of distinct copies "
819 "of the shared object file. Using B<dlmopen>(), this can be achieved by "
820 "loading the same shared object file into different namespaces."
821 msgstr ""
822
823 #. DL_NNS
824 #. type: Plain text
825 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
826 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
827 msgid "The glibc implementation supports a maximum of 16 namespaces."
828 msgstr ""
829
830 #. type: SS
831 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
832 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
833 #, no-wrap
834 msgid "Initialization and finalization functions"
835 msgstr ""
836
837 #. info gcc "C Extensions" "Function attributes"
838 #. type: Plain text
839 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
840 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
841 msgid ""
842 "Shared objects may export functions using the "
843 "B<__attribute__((constructor))> and B<__attribute__((destructor))> function "
844 "attributes. Constructor functions are executed before B<dlopen>() returns, "
845 "and destructor functions are executed before B<dlclose>() returns. A "
846 "shared object may export multiple constructors and destructors, and "
847 "priorities can be associated with each function to determine the order in "
848 "which they are executed. See the B<gcc> info pages (under \"Function "
849 "attributes\") for further information."
850 msgstr ""
851
852 #. type: Plain text
853 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
854 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
855 msgid ""
856 "An older method of (partially) achieving the same result is via the use of "
857 "two special symbols recognized by the linker: B<_init> and B<_fini>. If a "
858 "dynamically loaded shared object exports a routine named B<_init>(), then "
859 "that code is executed after loading a shared object, before B<dlopen>() "
860 "returns. If the shared object exports a routine named B<_fini>(), then that "
861 "routine is called just before the object is unloaded. In this case, one "
862 "must avoid linking against the system startup files, which contain default "
863 "versions of these files; this can be done by using the B<gcc>(1) I<-"
864 "nostartfiles> command-line option."
865 msgstr ""
866
867 #
868 #. Using these routines, or the gcc
869 #. .B \-nostartfiles
870 #. or
871 #. .B \-nostdlib
872 #. options, is not recommended.
873 #. Their use may result in undesired behavior,
874 #. since the constructor/destructor routines will not be executed
875 #. (unless special measures are taken).
876 #. .\" void _init(void) __attribute__((constructor));
877 #. .\" void _fini(void) __attribute__((destructor));
878 #. type: Plain text
879 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
880 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
881 msgid ""
882 "Use of B<_init> and B<_fini> is now deprecated in favor of the "
883 "aforementioned constructors and destructors, which among other advantages, "
884 "permit multiple initialization and finalization functions to be defined."
885 msgstr ""
886
887 #. type: Plain text
888 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
889 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
890 msgid ""
891 "Since glibc 2.2.3, B<atexit>(3) can be used to register an exit handler "
892 "that is automatically called when a shared object is unloaded."
893 msgstr ""
894
895 #. type: SS
896 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
897 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
898 #, no-wrap
899 msgid "History"
900 msgstr "História"
901
902 #. type: Plain text
903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
905 msgid "These functions are part of the dlopen API, derived from SunOS."
906 msgstr ""
907
908 #. type: SH
909 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
910 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
911 #, no-wrap
912 msgid "BUGS"
913 msgstr "BUGS"
914
915 #. dlerror(): "invalid mode"
916 #. https://sourceware.org/bugzilla/show_bug.cgi?id=18684
917 #. type: Plain text
918 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
919 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
920 msgid ""
921 "As at glibc 2.24, specifying the B<RTLD_GLOBAL> flag when calling "
922 "B<dlmopen>() generates an error. Furthermore, specifying B<RTLD_GLOBAL> "
923 "when calling B<dlopen>() results in a program crash (B<SIGSEGV>) if the "
924 "call is made from any object loaded in a namespace other than the initial "
925 "namespace."
926 msgstr ""
927
928 #. type: SH
929 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
930 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
931 #, no-wrap
932 msgid "EXAMPLES"
933 msgstr "EXEMPLOS"
934
935 #. type: Plain text
936 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
937 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
938 msgid ""
939 "The program below loads the (glibc) math library, looks up the address of "
940 "the B<cos>(3) function, and prints the cosine of 2.0. The following is an "
941 "example of building and running the program:"
942 msgstr ""
943
944 #. type: Plain text
945 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
946 #: opensuse-tumbleweed
947 #, fuzzy, no-wrap
948 #| msgid ""
949 #| "$ B<cc dlopen_demo.c -ldl>\n"
950 #| "$ B<./a.out>\n"
951 #| "-0.416147\n"
952 msgid ""
953 "$B< cc dlopen_demo.c -ldl>;\n"
954 "$B< ./a.out>;\n"
955 "-0.416147\n"
956 msgstr ""
957 "$ B<cc dlopen_demo.c -ldl>\n"
958 "$ B<./a.out>\n"
959 "-0.416147\n"
960
961 #. type: SS
962 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
963 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
964 #, no-wrap
965 msgid "Program source"
966 msgstr "Fonte do programa"
967
968 #. http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08
969 #. http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07
970 #. http://austingroupbugs.net/view.php?id=74
971 #. type: Plain text
972 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
973 #: opensuse-tumbleweed
974 #, no-wrap
975 msgid ""
976 "#include E<lt>dlfcn.hE<gt>\n"
977 "#include E<lt>stdio.hE<gt>\n"
978 "#include E<lt>stdlib.hE<gt>\n"
979 "\\&\n"
980 "#include E<lt>gnu/lib-names.hE<gt> /* Defines LIBM_SO (which will be a\n"
981 " string such as \"libm.so.6\") */\n"
982 "int\n"
983 "main(void)\n"
984 "{\n"
985 " void *handle;\n"
986 " typeof(double (double)) *cosine;\n"
987 " char *error;\n"
988 "\\&\n"
989 " handle = dlopen(LIBM_SO, RTLD_LAZY);\n"
990 " if (!handle) {\n"
991 " fprintf(stderr, \"%s\\[rs]n\", dlerror());\n"
992 " exit(EXIT_FAILURE);\n"
993 " }\n"
994 "\\&\n"
995 " dlerror(); /* Clear any existing error */\n"
996 "\\&\n"
997 " cosine = (typeof(double (double)) *) dlsym(handle, \"cos\");\n"
998 "\\&\n"
999 " /* According to the ISO C standard, casting between function\n"
1000 " pointers and \\[aq]void *\\[aq], as done above, produces undefined results.\n"
1001 " POSIX.1-2001 and POSIX.1-2008 accepted this state of affairs and\n"
1002 " proposed the following workaround:\n"
1003 "\\&\n"
1004 " *(void **) &cosine = dlsym(handle, \"cos\");\n"
1005 "\\&\n"
1006 " This (clumsy) cast conforms with the ISO C standard and will\n"
1007 " avoid any compiler warnings.\n"
1008 "\\&\n"
1009 " The 2013 Technical Corrigendum 1 to POSIX.1-2008 improved matters\n"
1010 " by requiring that conforming implementations support casting\n"
1011 " \\[aq]void *\\[aq] to a function pointer. Nevertheless, some compilers\n"
1012 " (e.g., gcc with the \\[aq]-pedantic\\[aq] option) may complain about the\n"
1013 " cast used in this program. */\n"
1014 "\\&\n"
1015 " error = dlerror();\n"
1016 " if (error != NULL) {\n"
1017 " fprintf(stderr, \"%s\\[rs]n\", error);\n"
1018 " exit(EXIT_FAILURE);\n"
1019 " }\n"
1020 "\\&\n"
1021 " printf(\"%f\\[rs]n\", (*cosine)(2.0));\n"
1022 " dlclose(handle);\n"
1023 " exit(EXIT_SUCCESS);\n"
1024 "}\n"
1025 msgstr ""
1026
1027 #. SRC END
1028 #. type: SH
1029 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1030 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1031 #, no-wrap
1032 msgid "SEE ALSO"
1033 msgstr "VEJA TAMBÉM"
1034
1035 #. type: Plain text
1036 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1037 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1038 msgid ""
1039 "B<ld>(1), B<ldd>(1), B<pldd>(1), B<dl_iterate_phdr>(3), B<dladdr>(3), "
1040 "B<dlerror>(3), B<dlinfo>(3), B<dlsym>(3), B<rtld-audit>(7), B<ld.so>(8), "
1041 "B<ldconfig>(8)"
1042 msgstr ""
1043 "B<ld>(1), B<ldd>(1), B<pldd>(1), B<dl_iterate_phdr>(3), B<dladdr>(3), "
1044 "B<dlerror>(3), B<dlinfo>(3), B<dlsym>(3), B<rtld-audit>(7), B<ld.so>(8), "
1045 "B<ldconfig>(8)"
1046
1047 #. type: Plain text
1048 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1049 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1050 msgid "gcc info pages, ld info pages"
1051 msgstr ""
1052
1053 #. type: TH
1054 #: debian-trixie
1055 #, no-wrap
1056 msgid "2024-06-15"
1057 msgstr "15 junho 2024"
1058
1059 #. type: TH
1060 #: debian-trixie
1061 #, no-wrap
1062 msgid "Linux man-pages 6.9.1"
1063 msgstr "Linux man-pages 6.9.1"
1064
1065 #. type: Plain text
1066 #: debian-trixie
1067 msgid "Dynamic linking library (I<libdl>, I<-ldl>)"
1068 msgstr ""
1069
1070 #. type: Plain text
1071 #: debian-trixie fedora-44 fedora-rawhide
1072 #, no-wrap
1073 msgid ""
1074 "B<void *dlopen(const char *>I<filename>B<, int >I<flags>B<);>\n"
1075 "B<int dlclose(void *>I<handle>B<);>\n"
1076 msgstr ""
1077 "B<void *dlopen(const char *>I<filename>B<, int >I<flags>B<);>\n"
1078 "B<int dlclose(void *>I<handle>B<);>\n"
1079
1080 #. type: Plain text
1081 #: debian-trixie fedora-44 fedora-rawhide
1082 #, no-wrap
1083 msgid "B<void *dlmopen(Lmid_t >I<lmid>B<, const char *>I<filename>B<, int >I<flags>B<);>\n"
1084 msgstr "B<void *dlmopen(Lmid_t >I<lmid>B<, const char *>I<filename>B<, int >I<flags>B<);>\n"
1085
1086 #. type: Plain text
1087 #: debian-trixie fedora-44 fedora-rawhide
1088 #, fuzzy
1089 #| msgid ""
1090 #| "B<dlopen> loads a dynamic library from the file named by the null "
1091 #| "terminated string I<filename> and returns an opaque \"handle\" for the "
1092 #| "dynamic library. If I<filename> is not an absolute path (i.e., it does "
1093 #| "not begin with a \"/\"), then the file is searched for in the following "
1094 #| "locations:"
1095 msgid ""
1096 "The function B<dlopen>() loads the dynamic shared object (shared library) "
1097 "file named by the null-terminated string I<filename> and returns an opaque "
1098 "\"handle\" for the loaded object. This handle is employed with other "
1099 "functions in the dlopen API, such as B<dlsym>(3), B<dladdr>(3), "
1100 "B<dlinfo>(3), and B<dlclose>()."
1101 msgstr ""
1102 "B<dlopen> carrega uma biblioteca dinâmica do arquivo designado pela "
1103 "sequência I<filename> e retorna um manipulador (handle) para a biblioteca. "
1104 "Se I<filename> não for um caminho absoluto (não começar com '/'), o arquivo "
1105 "será procurado nos seguintes locais:"
1106
1107 #. FIXME On Solaris, when handle is NULL, we seem to get back
1108 #. a handle for (something like) the root of the namespace.
1109 #. The point here is that if we do a dlmopen(LM_ID_NEWLM), then
1110 #. the filename==NULL case returns a different handle than
1111 #. in the initial namespace. But, on glibc, the same handle is
1112 #. returned. This is probably a bug in glibc.
1113 #. type: Plain text
1114 #: debian-trixie fedora-44 fedora-rawhide
1115 msgid ""
1116 "If I<filename> is NULL, then the returned handle is for the main program. "
1117 "If I<filename> contains a slash (\"/\"), then it is interpreted as a "
1118 "(relative or absolute) pathname. Otherwise, the dynamic linker searches for "
1119 "the object as follows (see B<ld.so>(8) for further details):"
1120 msgstr ""
1121
1122 #. type: Plain text
1123 #: debian-trixie fedora-44 fedora-rawhide
1124 msgid ""
1125 "The cache file I</etc/ld.so.cache> (maintained by B<ldconfig>(8)) is "
1126 "checked to see whether it contains an entry for I<filename>."
1127 msgstr ""
1128
1129 #. type: Plain text
1130 #: debian-trixie fedora-44 fedora-rawhide
1131 msgid ""
1132 "If the object specified by I<filename> has dependencies on other shared "
1133 "objects, then these are also automatically loaded by the dynamic linker "
1134 "using the same rules. (This process may occur recursively, if those objects "
1135 "in turn have dependencies, and so on.)"
1136 msgstr ""
1137
1138 #. type: Plain text
1139 #: debian-trixie fedora-44 fedora-rawhide
1140 msgid ""
1141 "If I<filename> is NULL, then the returned handle is for the main program. "
1142 "When given to B<dlsym>(3), this handle causes a search for a symbol in the "
1143 "main program, followed by all shared objects loaded at program startup, and "
1144 "then all shared objects loaded by B<dlopen>() with the flag B<RTLD_GLOBAL>."
1145 msgstr ""
1146
1147 #. type: Plain text
1148 #: debian-trixie fedora-44 fedora-rawhide
1149 msgid ""
1150 "This function performs the same task as B<dlopen>()\\[em]the I<filename> and "
1151 "I<flags> arguments, as well as the return value, are the same, except for "
1152 "the differences noted below."
1153 msgstr ""
1154
1155 #. type: Plain text
1156 #: debian-trixie fedora-44 fedora-rawhide
1157 #, fuzzy
1158 #| msgid ""
1159 #| "If I<filename> is a NULL pointer, then the returned handle is for the "
1160 #| "main program."
1161 msgid ""
1162 "If I<filename> is NULL, then the only permitted value for I<lmid> is "
1163 "B<LM_ID_BASE>."
1164 msgstr "Se I<filename> for NULO, o manipulador designará o programa principal."
1165
1166 #. type: Plain text
1167 #: debian-trixie fedora-44 fedora-rawhide
1168 #, no-wrap
1169 msgid ""
1170 "$ B<cc dlopen_demo.c -ldl>\n"
1171 "$ B<./a.out>\n"
1172 "-0.416147\n"
1173 msgstr ""
1174 "$ B<cc dlopen_demo.c -ldl>\n"
1175 "$ B<./a.out>\n"
1176 "-0.416147\n"
1177
1178 #. http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08
1179 #. http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07
1180 #. http://austingroupbugs.net/view.php?id=74
1181 #. type: Plain text
1182 #: debian-trixie
1183 #, no-wrap
1184 msgid ""
1185 "#include E<lt>dlfcn.hE<gt>\n"
1186 "#include E<lt>stdio.hE<gt>\n"
1187 "#include E<lt>stdlib.hE<gt>\n"
1188 "\\&\n"
1189 "#include E<lt>gnu/lib-names.hE<gt> /* Defines LIBM_SO (which will be a\n"
1190 " string such as \"libm.so.6\") */\n"
1191 "int\n"
1192 "main(void)\n"
1193 "{\n"
1194 " void *handle;\n"
1195 " double (*cosine)(double);\n"
1196 " char *error;\n"
1197 "\\&\n"
1198 " handle = dlopen(LIBM_SO, RTLD_LAZY);\n"
1199 " if (!handle) {\n"
1200 " fprintf(stderr, \"%s\\[rs]n\", dlerror());\n"
1201 " exit(EXIT_FAILURE);\n"
1202 " }\n"
1203 "\\&\n"
1204 " dlerror(); /* Clear any existing error */\n"
1205 "\\&\n"
1206 " cosine = (double (*)(double)) dlsym(handle, \"cos\");\n"
1207 "\\&\n"
1208 " /* According to the ISO C standard, casting between function\n"
1209 " pointers and \\[aq]void *\\[aq], as done above, produces undefined results.\n"
1210 " POSIX.1-2001 and POSIX.1-2008 accepted this state of affairs and\n"
1211 " proposed the following workaround:\n"
1212 "\\&\n"
1213 " *(void **) (&cosine) = dlsym(handle, \"cos\");\n"
1214 "\\&\n"
1215 " This (clumsy) cast conforms with the ISO C standard and will\n"
1216 " avoid any compiler warnings.\n"
1217 "\\&\n"
1218 " The 2013 Technical Corrigendum 1 to POSIX.1-2008 improved matters\n"
1219 " by requiring that conforming implementations support casting\n"
1220 " \\[aq]void *\\[aq] to a function pointer. Nevertheless, some compilers\n"
1221 " (e.g., gcc with the \\[aq]-pedantic\\[aq] option) may complain about the\n"
1222 " cast used in this program. */\n"
1223 "\\&\n"
1224 " error = dlerror();\n"
1225 " if (error != NULL) {\n"
1226 " fprintf(stderr, \"%s\\[rs]n\", error);\n"
1227 " exit(EXIT_FAILURE);\n"
1228 " }\n"
1229 "\\&\n"
1230 " printf(\"%f\\[rs]n\", (*cosine)(2.0));\n"
1231 " dlclose(handle);\n"
1232 " exit(EXIT_SUCCESS);\n"
1233 "}\n"
1234 msgstr ""
1235
1236 #. type: TH
1237 #: fedora-44 fedora-rawhide
1238 #, no-wrap
1239 msgid "2025-01-05"
1240 msgstr "5 janeiro 2025"
1241
1242 #. type: TH
1243 #: fedora-44 fedora-rawhide
1244 #, no-wrap
1245 msgid "Linux man-pages 6.13"
1246 msgstr "Linux man-pages 6.13"
1247
1248 #. http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08
1249 #. http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07
1250 #. http://austingroupbugs.net/view.php?id=74
1251 #. type: Plain text
1252 #: fedora-44 fedora-rawhide
1253 #, no-wrap
1254 msgid ""
1255 "#include E<lt>dlfcn.hE<gt>\n"
1256 "#include E<lt>stdio.hE<gt>\n"
1257 "#include E<lt>stdlib.hE<gt>\n"
1258 "\\&\n"
1259 "#include E<lt>gnu/lib-names.hE<gt> /* Defines LIBM_SO (which will be a\n"
1260 " string such as \"libm.so.6\") */\n"
1261 "int\n"
1262 "main(void)\n"
1263 "{\n"
1264 " void *handle;\n"
1265 " typeof(double (double)) *cosine;\n"
1266 " char *error;\n"
1267 "\\&\n"
1268 " handle = dlopen(LIBM_SO, RTLD_LAZY);\n"
1269 " if (!handle) {\n"
1270 " fprintf(stderr, \"%s\\[rs]n\", dlerror());\n"
1271 " exit(EXIT_FAILURE);\n"
1272 " }\n"
1273 "\\&\n"
1274 " dlerror(); /* Clear any existing error */\n"
1275 "\\&\n"
1276 " cosine = (typeof(double (double)) *) dlsym(handle, \"cos\");\n"
1277 "\\&\n"
1278 " /* According to the ISO C standard, casting between function\n"
1279 " pointers and \\[aq]void *\\[aq], as done above, produces undefined results.\n"
1280 " POSIX.1-2001 and POSIX.1-2008 accepted this state of affairs and\n"
1281 " proposed the following workaround:\n"
1282 "\\&\n"
1283 " *(void **) &cosine = dlsym(handle, \"cos\");\n"
1284 "\\&\n"
1285 " This (clumsy) cast conforms with the ISO C standard and will\n"
1286 " avoid any compiler warnings.\n"
1287 "\\&\n"
1288 " The 2013 Technical Corrigendum 1 to POSIX.1-2008 improved matters\n"
1289 " by requiring that conforming implementations support casting\n"
1290 " \\[aq]void *\\[aq] to a function pointer. Nevertheless, some compilers\n"
1291 " (e.g., gcc with the \\[aq]-pedantic\\[aq] option) may complain about the\n"
1292 " cast used in this program. */\n"
1293 "\\&\n"
1294 " error = dlerror();\n"
1295 " if (error != NULL) {\n"
1296 " fprintf(stderr, \"%s\\[rs]n\", error);\n"
1297 " exit(EXIT_FAILURE);\n"
1298 " }\n"
1299 "\\&\n"
1300 " printf(\"%f\\[rs]n\", (*cosine)(2.0));\n"
1301 " dlclose(handle);\n"
1302 " exit(EXIT_SUCCESS);\n"
1303 "}\n"
1304 msgstr ""
1305
1306 #. type: TH
1307 #: mageia-cauldron
1308 #, no-wrap
1309 msgid "Linux man-pages 6.17"
1310 msgstr "Linux man-pages 6.17"
1311
1312 #. type: TH
1313 #: opensuse-leap-16-1 opensuse-tumbleweed
1314 #, no-wrap
1315 msgid "Linux man-pages (unreleased)"
1316 msgstr "Linux man-pages (não lançado)"