]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/dlopen.3
pldd.1, bpf.2, chdir.2, clone.2, fanotify_init.2, fanotify_mark.2, intro.2, ipc.2...
[thirdparty/man-pages.git] / man3 / dlopen.3
CommitLineData
fea681da
MK
1.\" Copyright 1995 Yggdrasil Computing, Incorporated.
2.\" written by Adam J. Richter (adam@yggdrasil.com),
3.\" with typesetting help from Daniel Quinlan (quinlan@yggdrasil.com).
616c2730 4.\" and Copyright 2003, 2015 Michael Kerrisk <mtk.manpages@gmail.com>
fea681da 5.\"
1dd72f9c 6.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
fea681da
MK
7.\" This is free documentation; you can redistribute it and/or
8.\" modify it under the terms of the GNU General Public License as
9.\" published by the Free Software Foundation; either version 2 of
10.\" the License, or (at your option) any later version.
11.\"
12.\" The GNU General Public License's references to "object code"
13.\" and "executables" are to be interpreted as the output of any
14.\" document formatting or typesetting system, including
15.\" intermediate and printed output.
16.\"
17.\" This manual is distributed in the hope that it will be useful,
18.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20.\" GNU General Public License for more details.
21.\"
22.\" You should have received a copy of the GNU General Public
c715f741
MK
23.\" License along with this manual; if not, see
24.\" <http://www.gnu.org/licenses/>.
6a8d8745 25.\" %%%LICENSE_END
fea681da
MK
26.\"
27.\" Modified by David A. Wheeler <dwheeler@dwheeler.com> 2000-11-28.
28.\" Applied patch by Terran Melconian, aeb, 2001-12-14.
29.\" Modified by Hacksaw <hacksaw@hacksaw.org> 2003-03-13.
30.\" Modified by Matt Domsch, 2003-04-09: _init and _fini obsolete
c11b1abf 31.\" Modified by Michael Kerrisk <mtk.manpages@gmail.com> 2003-05-16.
fea681da 32.\" Modified by Walter Harms: dladdr, dlvsym
27a61e86 33.\" Modified by Petr Baudis <pasky@suse.cz>, 2008-12-04: dladdr caveat
fea681da 34.\"
63121bd4 35.TH DLOPEN 3 2019-08-02 "Linux" "Linux Programmer's Manual"
fea681da 36.SH NAME
374b34d3
MK
37dlclose, dlopen, dlmopen \-
38open and close a shared object
fea681da
MK
39.SH SYNOPSIS
40.B #include <dlfcn.h>
68e4db0a 41.PP
cf2789f1 42.BI "void *dlopen(const char *" filename ", int " flags );
68e4db0a 43.PP
fea681da 44.BI "int dlclose(void *" handle );
68e4db0a 45.PP
3f4c09d0
MK
46.B #define _GNU_SOURCE
47.br
48.B #include <dlfcn.h>
68e4db0a 49.PP
efdd68a5 50.BI "void *dlmopen (Lmid_t " lmid ", const char *" filename ", int " flags );
68e4db0a 51.PP
3f37321b 52Link with \fI\-ldl\fP.
fea681da 53.SH DESCRIPTION
73d8cece 54.SS dlopen()
fea681da 55The function
d355f1ed 56.BR dlopen ()
43151de3
MK
57loads the dynamic shared object (shared library)
58file named by the null-terminated
fea681da
MK
59string
60.I filename
43151de3 61and returns an opaque "handle" for the loaded object.
6ceba646
MK
62This handle is employed with other functions in the dlopen API, such as
63.BR dlsym (3),
64.BR dladdr (3),
65.BR dlinfo (3),
66and
67.BR dlclose ().
847e0d88 68.PP
fea681da
MK
69If
70.I filename
6962fdf9
MK
71.\" FIXME On Solaris, when handle is NULL, we seem to get back
72.\" a handle for (something like) the root of the namespace.
73.\" The point here is that if we do a dlmopen(LM_ID_NEWLM), then
74.\" the filename==NULL case returns a different handle than
75.\" in the initial namespace. But, on glibc, the same handle is
76.\" returned. This is probably a bug in glibc.
77.\"
fea681da
MK
78is NULL, then the returned handle is for the main program.
79If
80.I filename
81contains a slash ("/"), then it is interpreted as a (relative
82or absolute) pathname.
43151de3 83Otherwise, the dynamic linker searches for the object as follows
fea681da
MK
84(see
85.BR ld.so (8)
86for further details):
86100362 87.IP o 4
fea681da
MK
88(ELF only) If the executable file for the calling program
89contains a DT_RPATH tag, and does not contain a DT_RUNPATH tag,
90then the directories listed in the DT_RPATH tag are searched.
91.IP o
65f6a3ee 92If, at the time that the program was started, the environment variable
0daa9e92 93.B LD_LIBRARY_PATH
65f6a3ee 94was defined to contain a colon-separated list of directories,
fea681da 95then these are searched.
8ac45f42 96(As a security measure, this variable is ignored for set-user-ID and
880f5b4b 97set-group-ID programs.)
fea681da
MK
98.IP o
99(ELF only) If the executable file for the calling program
100contains a DT_RUNPATH tag, then the directories listed in that tag
101are searched.
102.IP o
103The cache file
0daa9e92 104.I /etc/ld.so.cache
fea681da
MK
105(maintained by
106.BR ldconfig (8))
107is checked to see whether it contains an entry for
108.IR filename .
109.IP o
110The directories
c13182ef
MK
111.I /lib
112and
113.I /usr/lib
fea681da
MK
114are searched (in that order).
115.PP
43151de3
MK
116If the object specified by
117.I filename
118has dependencies on other shared objects,
fea681da 119then these are also automatically loaded by the dynamic linker
c13182ef
MK
120using the same rules.
121(This process may occur recursively,
43151de3 122if those objects in turn have dependencies, and so on.)
fea681da 123.PP
336e88f0 124One of the following two values must be included in
cf2789f1 125.IR flags :
336e88f0 126.TP
fea681da 127.B RTLD_LAZY
c13182ef 128Perform lazy binding.
79039742 129Resolve symbols only as the code that references them is executed.
336e88f0 130If the symbol is never referenced, then it is never resolved.
33a0ccb2 131(Lazy binding is performed only for function references;
336e88f0 132references to variables are always immediately bound when
43151de3 133the shared object is loaded.)
50008330
MK
134Since glibc 2.1.1,
135.\" commit 12b5b6b7f78ea111e89bbf638294a5413c791072
136this flag is overridden by the effect of the
137.B LD_BIND_NOW
138environment variable.
336e88f0 139.TP
fea681da 140.B RTLD_NOW
336e88f0 141If this value is specified, or the environment variable
fea681da 142.B LD_BIND_NOW
aa796481 143is set to a nonempty string,
43151de3 144all undefined symbols in the shared object are resolved before
d355f1ed 145.BR dlopen ()
c13182ef
MK
146returns.
147If this cannot be done, an error is returned.
fea681da 148.PP
dfacdd0a 149Zero or more of the following values may also be ORed in
cf2789f1 150.IR flags :
336e88f0 151.TP
fea681da 152.B RTLD_GLOBAL
43151de3 153The symbols defined by this shared object will be
fe854f15 154made available for symbol resolution of subsequently loaded shared objects.
c13182ef 155.TP
336e88f0 156.B RTLD_LOCAL
c13182ef 157This is the converse of
336e88f0
MK
158.BR RTLD_GLOBAL ,
159and the default if neither flag is specified.
43151de3
MK
160Symbols defined in this shared object are not made available to resolve
161references in subsequently loaded shared objects.
336e88f0 162.TP
c10859eb 163.BR RTLD_NODELETE " (since glibc 2.2)"
43151de3 164Do not unload the shared object during
336e88f0 165.BR dlclose ().
d031ca92 166Consequently, the object's static and global variables are not reinitialized
43151de3 167if the object is reloaded with
336e88f0
MK
168.BR dlopen ()
169at a later time.
336e88f0 170.TP
c10859eb 171.BR RTLD_NOLOAD " (since glibc 2.2)"
43151de3
MK
172Don't load the shared object.
173This can be used to test if the object is already resident
336e88f0 174.RB ( dlopen ()
43151de3
MK
175returns NULL if it is not, or the object's handle if it is resident).
176This flag can also be used to promote the flags on a shared object
336e88f0 177that is already loaded.
43151de3 178For example, a shared object that was previously loaded with
336e88f0 179.B RTLD_LOCAL
3b777aff 180can be reopened with
336e88f0 181.BR RTLD_NOLOAD\ |\ RTLD_GLOBAL .
336e88f0 182.\"
bba06189
MK
183.TP
184.BR RTLD_DEEPBIND " (since glibc 2.3.4)"
c13182ef 185.\" Inimitably described by UD in
a3a11667 186.\" http://sources.redhat.com/ml/libc-hacker/2004-09/msg00083.html.
c13182ef 187Place the lookup scope of the symbols in this
43151de3
MK
188shared object ahead of the global scope.
189This means that a self-contained object will use
c13182ef 190its own symbols in preference to global symbols with the same name
43151de3 191contained in objects that have already been loaded.
fea681da
MK
192.PP
193If
194.I filename
b437fdd9 195is NULL, then the returned handle is for the main program.
fea681da 196When given to
d355f1ed 197.BR dlsym (),
fea681da 198this handle causes a search for a symbol in the main program,
43151de3
MK
199followed by all shared objects loaded at program startup,
200and then all shared objects loaded by
d355f1ed 201.BR dlopen ()
fea681da 202with the flag
a5e0a0e4 203.BR RTLD_GLOBAL .
fea681da 204.PP
43898de4
MK
205Symbol references in the shared object are resolved using (in order):
206symbols in the link map of objects loaded for the main program and its
207dependencies;
208symbols in shared objects (and their dependencies)
209that were previously opened with
210.BR dlopen ()
211using the
212.BR RTLD_GLOBAL
213flag;
214and definitions in the shared object itself
215(and any dependencies that were loaded for that object).
216.PP
58a4ac49
MK
217Any global symbols in the executable that were placed into
218its dynamic symbol table by
219.BR ld (1)
220can also be used to resolve references in a dynamically loaded shared object.
221Symbols may be placed in the dynamic symbol table
222either because the executable was linked with the flag "\-rdynamic"
223(or, synonymously, "\-\-export\-dynamic"), which causes all of
224the executable's global symbols to be placed in the dynamic symbol table,
225or because
226.BR ld (1)
227noted a dependency on a symbol in another object during static linking.
fea681da 228.PP
df77f62b 229If the same shared object is opened again with
d355f1ed 230.BR dlopen (),
43151de3 231the same object handle is returned.
e83ed17d 232The dynamic linker maintains reference
43151de3 233counts for object handles, so a dynamically loaded shared object is not
fea681da 234deallocated until
d355f1ed 235.BR dlclose ()
fea681da 236has been called on it as many times as
d355f1ed 237.BR dlopen ()
c13182ef 238has succeeded on it.
f642cc55 239Constructors (see below) are called only when the object is actually loaded
df77f62b 240into memory (i.e., when the reference count increases to 1).
da6b9a61
MK
241.PP
242A subsequent
b6779d1d
MK
243.BR dlopen ()
244call that loads the same shared object with
fea681da 245.B RTLD_NOW
9c169754 246may force symbol resolution for a shared object earlier loaded with
fea681da 247.BR RTLD_LAZY .
9bdbaa8a
MK
248Similarly, an object that was previously opened with
249.BR RTLD_LOCAL
250can be promoted to
251.BR RTLD_GLOBAL
252in a subsequent
253.BR dlopen ().
fea681da
MK
254.PP
255If
d355f1ed 256.BR dlopen ()
fea681da 257fails for any reason, it returns NULL.
9c169754 258.\"
efdd68a5
MK
259.SS dlmopen()
260This function performs the same task as
261.BR dlopen ()\(emthe
262.I filename
263and
264.I flags
65175b1d
MK
265arguments, as well as the return value, are the same,
266except for the differences noted below.
847e0d88 267.PP
65175b1d
MK
268The
269.BR dlmopen ()
270function differs from
271.BR dlopen ()
272primarily in that it accepts an additional argument,
efdd68a5 273.IR lmid ,
9c169754
MK
274that specifies the link-map list (also referred to as a
275.IR namespace )
276in which the shared object should be loaded.
efdd68a5
MK
277(By comparison,
278.BR dlopen ()
9c169754 279adds the dynamically loaded shared object to the same namespace as
efdd68a5
MK
280the shared object from which the
281.BR dlopen ()
282call is made.)
9c169754
MK
283The
284.I Lmid_t
285type is an opaque handle that refers to a namespace.
847e0d88 286.PP
efdd68a5
MK
287The
288.I lmid
9c169754 289argument is either the ID of an existing namespace
efdd68a5
MK
290.\" FIXME: Is using dlinfo() RTLD_DI_LMID the right technique?
291(which can be obtained using the
292.BR dlinfo (3)
293.B RTLD_DI_LMID
294request) or one of the following special values:
295.TP
296.B LM_ID_BASE
9c169754
MK
297Load the shared object in the initial namespace
298(i.e., the application's namespace).
efdd68a5
MK
299.TP
300.B LM_ID_NEWLM
9c169754 301Create a new namespace and load the shared object in that namespace.
982eac0d 302The object must have been correctly linked
9c169754
MK
303to reference all of the other shared objects that it requires,
304since the new namespace is initially empty.
65175b1d 305.PP
65175b1d 306If
438168a2 307.I filename
65175b1d
MK
308is NULL, then the only permitted value for
309.I lmid
310is
311.BR LM_ID_BASE .
73d8cece 312.SS dlclose()
fea681da 313The function
d355f1ed 314.BR dlclose ()
43151de3
MK
315decrements the reference count on the
316dynamically loaded shared object referred to by
fea681da 317.IR handle .
ba20328e
MK
318.PP
319If the object's reference count drops to zero
320and no symbols in this object are required by other objects,
cbd8927f
MK
321then the object is unloaded
322after first calling any destructors defined for the object.
ba20328e
MK
323(Symbols in this object might be required in another object
324because this object was opened with the
325.BR RTLD_GLOBAL
326flag and one of its symbols satisfied a relocation in another object.)
327.PP
cc2ddf2f
MK
328All shared objects that were automatically loaded when
329.BR dlopen ()
330was invoked on the object referred to by
331.I handle
332are recursively closed in the same manner.
847e0d88 333.PP
747b2b0a
MK
334A successful return from
335.BR dlclose ()
336does not guarantee that the symbols associated with
337.I handle
338are removed from the caller's address space.
339In addition to references resulting from explicit
340.BR dlopen ()
341calls, a shared object may have been implicitly loaded
342(and reference counted) because of dependencies in other shared objects.
343Only when all references have been released can the shared object
344be removed from the address space.
982eac0d
MK
345.SH RETURN VALUE
346On success,
347.BR dlopen ()
348and
349.BR dlmopen ()
f642cc55 350return a non-NULL handle for the loaded object.
982eac0d
MK
351On error
352(file could not be found, was not readable, had the wrong format,
353or caused errors during loading),
354these functions return NULL.
847e0d88 355.PP
982eac0d 356On success,
d355f1ed 357.BR dlclose ()
9ebcbe13 358returns 0; on error, it returns a nonzero value.
847e0d88 359.PP
982eac0d
MK
360Errors from these functions can be diagnosed using
361.BR dlerror (3).
6445992d 362.SH VERSIONS
374b34d3 363.BR dlopen ()
6445992d 364and
374b34d3 365.BR dlclose ()
6445992d 366are present in glibc 2.0 and later.
efdd68a5
MK
367.BR dlmopen ()
368first appeared in glibc 2.3.4.
b23510e5
MK
369.SH ATTRIBUTES
370For an explanation of the terms used in this section, see
371.BR attributes (7).
372.TS
373allbox;
374lbw30 lb lb
375l l l.
376Interface Attribute Value
377T{
378.BR dlopen (),
379.BR dlmopen (),
380.BR dlclose ()
381T} Thread safety MT-Safe
382.TE
47297adb 383.SH CONFORMING TO
2b2581ee 384POSIX.1-2001 describes
374b34d3 385.BR dlclose ()
2b2581ee 386and
896c71d0 387.BR dlopen ().
3f4c09d0 388The
efdd68a5 389.BR dlmopen ()
896c71d0 390function is a GNU extension.
847e0d88 391.PP
e8a1758c
MK
392The
393.BR RTLD_NOLOAD ,
394.BR RTLD_NODELETE ,
395and
1a08b97b 396.BR RTLD_DEEPBIND
e8a1758c
MK
397flags are GNU extensions;
398the first two of these flags are also present on Solaris.
2b2581ee 399.SH NOTES
9c169754
MK
400.SS dlmopen() and namespaces
401A link-map list defines an isolated namespace for the
402resolution of symbols by the dynamic linker.
403Within a namespace,
404dependent shared objects are implicitly loaded according to the usual rules,
405and symbol references are likewise resolved according to the usual rules,
406but such resolution is confined to the definitions provided by the
407objects that have been (explicitly and implicitly) loaded into the namespace.
847e0d88 408.PP
9c169754
MK
409The
410.BR dlmopen ()
411function permits object-load isolation\(emthe ability
412to load a shared object in a new namespace without
413exposing the rest of the application to the symbols
414made available by the new object.
415Note that the use of the
416.B RTLD_LOCAL
417flag is not sufficient for this purpose,
418since it prevents a shared object's symbols from being available to
419.I any
420other shared object.
421In some cases,
422we may want to make the symbols provided by a dynamically
43151de3 423loaded shared object available to (a subset of) other shared objects
9c169754 424without exposing those symbols to the entire application.
982eac0d
MK
425This can be achieved by using a separate namespace and the
426.B RTLD_GLOBAL
427flag.
847e0d88 428.PP
0fdbc114
MK
429The
430.BR dlmopen ()
431function also can be used to provide better isolation than the
432.BR RTLD_LOCAL
433flag.
8dbd75b8 434In particular, shared objects loaded with
0fdbc114
MK
435.BR RTLD_LOCAL
436may be promoted to
437.BR RTLD_GLOBAL
438if they are dependencies of another shared object loaded with
439.BR RTLD_GLOBAL .
440Thus,
441.BR RTLD_LOCAL
442is insufficient to isolate a loaded shared object except in the (uncommon)
443case where one has explicit control over all shared object dependencies.
847e0d88 444.PP
9c169754
MK
445Possible uses of
446.BR dlmopen ()
447are plugins where the author of the plugin-loading framework
448can't trust the plugin authors and does not wish
449any undefined symbols from the plugin framework to be resolved to plugin
450symbols.
451Another use is to load the same object more than once.
452Without the use of
982eac0d 453.BR dlmopen (),
9c169754
MK
454this would require the creation of distinct copies of the shared object file.
455Using
982eac0d 456.BR dlmopen (),
9c169754
MK
457this can be achieved by loading the same shared object file into
458different namespaces.
847e0d88 459.PP
982eac0d
MK
460The glibc implementation supports a maximum of
461.\" DL_NNS
46216 namespaces.
9c169754 463.\"
c7c01315
MK
464.SS Initialization and finalization functions
465Shared objects may export functions using the
466.B __attribute__((constructor))
467and
468.B __attribute__((destructor))
469function attributes.
470Constructor functions are executed before
471.BR dlopen ()
472returns, and destructor functions are executed before
473.BR dlclose ()
474returns.
475A shared object may export multiple constructors and destructors,
476and priorities can be associated with each function
477to determine the order in which they are executed.
478See the
479.BR gcc
480info pages (under "Function attributes")
481.\" info gcc "C Extensions" "Function attributes"
482for further information.
847e0d88 483.PP
c7c01315
MK
484An older method of (partially) achieving the same result is via the use of
485two special symbols recognized by the linker:
e8290357
MK
486.B _init
487and
488.BR _fini .
489If a dynamically loaded shared object exports a routine named
490.BR _init (),
c7c01315 491then that code is executed after loading a shared object, before
e8290357
MK
492.BR dlopen ()
493returns.
494If the shared object exports a routine named
495.BR _fini (),
496then that routine is called just before the object is unloaded.
c7c01315
MK
497In this case, one must avoid linking against the system startup files,
498which contain default versions of these files;
e8290357
MK
499this can be done by using the
500.BR gcc (1)
501.I \-nostartfiles
502command-line option.
dd3568a1 503.PP
c7c01315
MK
504Use of
505.B _init
e8290357 506and
c7c01315
MK
507.BR _fini
508is now deprecated in favor of the aforementioned
509constructors and destructors,
510which among other advantages,
511permit multiple initialization and finalization functions to be defined.
512.\"
513.\" Using these routines, or the gcc
514.\" .B \-nostartfiles
515.\" or
516.\" .B \-nostdlib
517.\" options, is not recommended.
518.\" Their use may result in undesired behavior,
519.\" since the constructor/destructor routines will not be executed
520.\" (unless special measures are taken).
521.\" .\" void _init(void) __attribute__((constructor));
522.\" .\" void _fini(void) __attribute__((destructor));
e8290357 523.\"
847e0d88 524.PP
b198e0ae
MK
525Since glibc 2.2.3,
526.BR atexit (3)
527can be used to register an exit handler that is automatically
528called when a shared object is unloaded.
2b2581ee 529.SS History
896c71d0 530These functions are part of the dlopen API, derived from SunOS.
82bd66b8 531.SH BUGS
348348b1 532As at glibc 2.24, specifying the
82bd66b8
MK
533.BR RTLD_GLOBAL
534flag when calling
535.BR dlmopen ()
536.\" dlerror(): "invalid mode"
537generates an error.
538Furthermore, specifying
539.BR RTLD_GLOBAL
540when calling
541.BR dlopen ()
542results in a program crash
543.RB ( SIGSEGV )
544if the call is made from any object loaded in a
545namespace other than the initial namespace.
fea681da 546.SH EXAMPLE
2e056718
MK
547The program below loads the (glibc) math library,
548looks up the address of the
549.BR cos (3)
550function, and prints the cosine of 2.0.
551The following is an example of building and running the program:
847e0d88 552.PP
2e056718 553.in +4n
b8302363 554.EX
2e056718
MK
555$ \fBcc dlopen_demo.c \-ldl\fP
556$ \fB./a.out\fP
557\-0.416147
b8302363 558.EE
2e056718
MK
559.in
560.SS Program source
c7885256 561\&
e7d0bb47 562.EX
fea681da 563#include <stdio.h>
b28f7a67 564#include <stdlib.h>
fea681da 565#include <dlfcn.h>
b44cf4bc
MK
566#include <gnu/lib-names.h> /* Defines LIBM_SO (which will be a
567 string such as "libm.so.6") */
c13182ef 568int
4373ccc0 569main(void)
cf0a9ace 570{
fea681da
MK
571 void *handle;
572 double (*cosine)(double);
573 char *error;
574
b44cf4bc 575 handle = dlopen(LIBM_SO, RTLD_LAZY);
fea681da 576 if (!handle) {
31a6818e 577 fprintf(stderr, "%s\en", dlerror());
4c44ffe5 578 exit(EXIT_FAILURE);
fea681da
MK
579 }
580
581 dlerror(); /* Clear any existing error */
c73d7281 582
29965345 583 cosine = (double (*)(double)) dlsym(handle, "cos");
c73d7281 584
daf28a2b 585 /* According to the ISO C standard, casting between function
4318a7d0
MK
586 pointers and 'void *', as done above, produces undefined results.
587 POSIX.1-2003 and POSIX.1-2008 accepted this state of affairs and
588 proposed the following workaround:
29965345
MK
589
590 *(void **) (&cosine) = dlsym(handle, "cos");
591
4318a7d0
MK
592 This (clumsy) cast conforms with the ISO C standard and will
593 avoid any compiler warnings.
29965345 594
daf28a2b
MK
595 The 2013 Technical Corrigendum to POSIX.1-2008 (a.k.a.
596 POSIX.1-2013) improved matters by requiring that conforming
597 implementations support casting 'void *' to a function pointer.
598 Nevertheless, some compilers (e.g., gcc with the '-pedantic'
599 option) may complain about the cast used in this program. */
600.\" http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08
601.\" http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07
5e0622ba 602.\" http://austingroupbugs.net/view.php?id=74
c73d7281 603
aefd6f89 604 error = dlerror();
3487d63b 605 if (error != NULL) {
31a6818e 606 fprintf(stderr, "%s\en", error);
4c44ffe5 607 exit(EXIT_FAILURE);
fea681da
MK
608 }
609
31a6818e 610 printf("%f\en", (*cosine)(2.0));
fea681da 611 dlclose(handle);
5bc8c34c 612 exit(EXIT_SUCCESS);
fea681da 613}
e7d0bb47 614.EE
47297adb 615.SH SEE ALSO
fea681da
MK
616.BR ld (1),
617.BR ldd (1),
5d95b7d8 618.BR pldd (1),
fea681da 619.BR dl_iterate_phdr (3),
6c46d3bc 620.BR dladdr (3),
374b34d3 621.BR dlerror (3),
46db2df1 622.BR dlinfo (3),
896c71d0 623.BR dlsym (3),
c18ecec9 624.BR rtld-audit (7),
fea681da 625.BR ld.so (8),
173fe7e7 626.BR ldconfig (8)
847e0d88 627.PP
7e936c29 628gcc info pages, ld info pages