1uselib(2)                     System Calls Manual                    uselib(2)
2
3
4

NAME

6       uselib - load shared library
7

SYNOPSIS

9       #include <unistd.h>
10
11       [[deprecated]] int uselib(const char *library);
12

DESCRIPTION

14       The  system call uselib() serves to load a shared library to be used by
15       the calling process.  It is given a pathname.   The  address  where  to
16       load  is  found in the library itself.  The library can have any recog‐
17       nized binary format.
18

RETURN VALUE

20       On success, zero is returned.  On error, -1 is returned, and  errno  is
21       set to indicate the error.
22

ERRORS

24       In  addition to all of the error codes returned by open(2) and mmap(2),
25       the following may also be returned:
26
27       EACCES The library specified by library does not have read  or  execute
28              permission,  or  the  caller does not have search permission for
29              one of the directories in the path prefix.  (See also path_reso‐
30              lution(7).)
31
32       ENFILE The system-wide limit on the total number of open files has been
33              reached.
34
35       ENOEXEC
36              The file specified by library is not an executable  of  a  known
37              type; for example, it does not have the correct magic numbers.
38

STANDARDS

40       Linux.
41

HISTORY

43       This obsolete system call is not supported by glibc.  No declaration is
44       provided in glibc headers, but, through a quirk of history,  glibc  be‐
45       fore  glibc 2.23 did export an ABI for this system call.  Therefore, in
46       order to employ this system call, it was sufficient to manually declare
47       the  interface in your code; alternatively, you could invoke the system
48       call using syscall(2).
49
50       In ancient libc versions (before glibc 2.0), uselib() was used to  load
51       the  shared  libraries with names found in an array of names in the bi‐
52       nary.
53
54       Since Linux 3.15, this system call is available only when the kernel is
55       configured with the CONFIG_USELIB option.
56

SEE ALSO

58       ar(1),  gcc(1),  ld(1),  ldd(1), mmap(2), open(2), dlopen(3), capabili‐
59       ties(7), ld.so(8)
60
61
62
63Linux man-pages 6.04              2023-03-30                         uselib(2)
Impressum