Commit Graph

62 Commits

Author SHA1 Message Date
Michael Kerrisk c18ecec98b dlopen.3, ld.so.8: SEE ALSO: add rtld-audit(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:47:47 +13:00
Petr Baudis 450c838664 dlopen.3: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-06 12:11:51 -05:00
Michael Kerrisk f439817725 dlopen.3: wsfix 2008-12-05 22:47:25 -05:00
Michael Kerrisk 1d2c48b3a7 dlopen.3: ffix 2008-12-05 22:47:25 -05:00
Petr Baudis 27a61e8622 dlopen.3: Describe confusing dladdr() behavior
dladdr() will act unexpectedly if called from non-pic code on a
compile-time-generated function pointer:

    /* test_dladdr.c */

    #define _GNU_SOURCE
    #include <dlfcn.h>
    #include <stdio.h>

    int
    main(void)
    {
        void *func;
        Dl_info info = {};

        func = printf;
        dladdr(func, &info);
        printf("%s at %p resolved from %s\n", info.dli_sname,
                func, info.dli_fname);

        return 0;
    }

    $ cc test_dladdr.c -ldl
    $ ./a.out
    printf at 0x804838c resolved from ./a.out
    $ cc -fPIC test_dladdr.c -ldl
    $ ./a.out
    _IO_printf at 0xb7f71c30 resolved from /lib/libc.so.6

In the long term, it might make sense to make dladdr() recognize
plt pointers and recurse, but I'm too afraid of Ulrich ;-)
(and he seems to be heavy proponent of pic code anyway, so
the chances for that to be accepted probably aren't high).

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:25 -05:00
Michael Kerrisk 65f6a3ee6d dlopen.3: LD_LIBRARY_PATH is inspected once, at program start-up
Make it clear that LD_LIBRARY_PATH is inspected *once*, at
program start-up.  (Verified from source and by experiment.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Michael B. Trausch <mike@trausch.us>
2008-10-29 14:54:19 -05:00
Michael Kerrisk 0425de01c7 s/ / / 2008-07-01 14:15:13 +00:00
Michael Kerrisk c343e74cfd Added VERSIONS section. 2008-06-11 13:43:34 +00:00
Michael Kerrisk c841cb6b87 Update timestamp 2008-05-08 13:53:59 +00:00
Michael Kerrisk 5744c9e140 Add more detail to the description of the fields in the
structure returned by dladdr().
2008-05-05 20:28:44 +00:00
Michael Kerrisk eba722884d s/nonzero/non-zero/ 2008-03-19 13:16:39 +00:00
Michael Kerrisk 1f04cc9731 s/nonempty/non-empty/ 2008-03-19 13:11:38 +00:00
Michael Kerrisk c382a36592 hyphenation fixes 2007-12-25 22:02:19 +00:00
Michael Kerrisk a6e2f12821 Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
2007-12-19 07:19:23 +00:00
Michael Kerrisk 088a639be3 Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
2007-12-19 06:57:44 +00:00
Michael Kerrisk a08ea57c20 Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
2007-12-19 05:53:30 +00:00
Michael Kerrisk ac5e6a3687 Add missing commas to SEE ALSO 2007-12-17 11:27:53 +00:00
Michael Kerrisk 1368e8476d ffix 2007-12-10 15:03:27 +00:00
Michael Kerrisk 3f37321b0e Added "Link with -ldl." to SYNOPSIS. 2007-10-23 14:01:03 +00:00
Michael Kerrisk ea5a4ee46b tfix 2007-10-12 06:43:45 +00:00
Michael Kerrisk 0daa9e92d0 Fix redundant formatting macros 2007-09-20 16:26:31 +00:00
Michael Kerrisk c11b1abf2e Change mtk's email address 2007-09-20 06:52:22 +00:00
Michael Kerrisk 097585edcb ffix 2007-06-22 20:40:07 +00:00
Michael Kerrisk c3dfd2c880 ffix 2007-06-22 17:42:06 +00:00
Michael Kerrisk 988db66164 strip trailing white space 2007-06-21 22:55:04 +00:00
Michael Kerrisk 29059a6548 s/-/\\-/ 2007-06-20 21:39:45 +00:00
Michael Kerrisk 680415afb4 Minor improvements to previous fix 2007-06-17 15:57:02 +00:00
Michael Kerrisk c73d72815e Add a comment explaining the need for the rather
strange cast of the return value of dlsym().
2007-06-17 15:23:37 +00:00
Michael Kerrisk 861003622f Formatting changes, and minor rewordings. 2007-06-15 21:40:11 +00:00
Michael Kerrisk d9bfdb9c21 Convert to American spelling conventions 2007-06-08 09:56:56 +00:00
Michael Kerrisk 2b2581ee37 Fix inconsistencies in order of .SH sections 2007-05-19 04:30:20 +00:00
Michael Kerrisk 7b1efcab96 Rewrote a heading 2007-05-18 12:19:07 +00:00
Michael Kerrisk 0303758ca5 wfix 2007-05-18 12:12:34 +00:00
Michael Kerrisk 8af1ba10bd Convert SH to SS and other section-related fixes. 2007-05-16 17:35:34 +00:00
Michael Kerrisk 5bc8c34c03 s/return 0/exit(EXIT_FAILURE)/ in main() function example program 2007-05-16 02:09:09 +00:00
Michael Kerrisk 4c44ffe5dc Use symbolic constants in exit(2) calls 2007-05-14 21:11:42 +00:00
Michael Kerrisk c13182efa3 Wrapped long lines, wrapped at sentence boundaries; stripped trailing
white space.
2007-04-12 22:42:49 +00:00
Michael Kerrisk cf0a9ace57 ffix 2007-04-05 12:36:57 +00:00
Michael Kerrisk 0a90178cbb Add feature_test_macros(7) to SEE ALSO 2007-01-28 20:00:24 +00:00
Michael Kerrisk b28f7a67d7 Add "#include <stdlib.h>" to example program. 2006-12-04 03:47:56 +00:00
Michael Kerrisk 68e1685c25 Updated CONFORMING TO section 2006-08-03 13:57:30 +00:00
Michael Kerrisk c10859eb0d Fix unbalanced quotes 2006-05-31 22:16:55 +00:00
Michael Kerrisk 6883b3e731 Changed copyright commnents to add 'and' in some cases 2006-05-22 23:52:24 +00:00
Michael Kerrisk 2c5f10893e Change "file name" to "filename" 2006-02-12 22:15:41 +00:00
Michael Kerrisk 9ff08aad91 Formatting fixes 2006-02-09 20:24:53 +00:00
Michael Kerrisk a3a1166783 Some rewordings of recently added text 2006-01-15 01:08:56 +00:00
Michael Kerrisk 0ed29c540c Noted use of atexit() to register a function that is
automatically called when a library is unloaded.
2006-01-14 05:37:06 +00:00
Michael Kerrisk bba0618959 Added description of RTLD_DEEPBIND. 2006-01-14 05:14:39 +00:00
Michael Kerrisk 336e88f0f8 Rewrote discussion of dlopen() 'flag' argument;
added description of RTLD_NOLOAD and RTLD_DELETE.
2006-01-14 04:29:47 +00:00
Michael Kerrisk 28d88c1751 Global change to many pages...
Various pages use inconsistent terms for 'null byte' (which
is the C99/SUSv3 term for the '\0' character).
To rectify this the following changes were made in these pages:

Replace 'zero byte' with 'null byte'.
Replace 'null character' with 'null byte'.
Replace 'nulls' with 'null bytes'.
Replace 'NUL-terminated' by 'null-terminated'.
Replace 'NUL' by 'null byte'.
Replace 'terminating NUL' by 'terminating null byte'.
Replace 'final NUL' by 'terminating null byte'.
Replace 'NUL character' by 'null byte'.
2006-01-13 02:09:44 +00:00