]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/dlopen.3
dlopen.3: Move discussion of _init() and _fini() to NOTES
[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).
9c169754 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.\"
1e64c86b 35.TH DLOPEN 3 2015-03-29 "Linux" "Linux Programmer's Manual"
fea681da 36.SH NAME
efdd68a5 37dlclose, dlerror, dlopen, dlmopen, dlsym, dlvsym \-
6445992d 38programming interface to dynamic linking loader
fea681da
MK
39.SH SYNOPSIS
40.B #include <dlfcn.h>
41.sp
cf2789f1 42.BI "void *dlopen(const char *" filename ", int " flags );
fea681da 43.sp
0daa9e92 44.B "char *dlerror(void);"
fea681da
MK
45.sp
46.BI "void *dlsym(void *" handle ", const char *" symbol );
47.sp
48.BI "int dlclose(void *" handle );
3f37321b 49.sp
3f4c09d0
MK
50.B #define _GNU_SOURCE
51.br
52.B #include <dlfcn.h>
53.sp
efdd68a5
MK
54.BI "void *dlmopen (Lmid_t " lmid ", const char *" filename ", int " flags );
55.sp
3f4c09d0
MK
56.BI "void *dlvsym(void *" handle ", char *" symbol ", char *" version );
57.sp
3f37321b 58Link with \fI\-ldl\fP.
fea681da 59.SH DESCRIPTION
3f4c09d0 60The functions described in this page
0a78ab7b 61provide an interface to the dynamic linking loader.
73d8cece 62.SS dlerror()
fea681da 63The function
d355f1ed 64.BR dlerror ()
23c9c564 65returns a human-readable string describing the most recent error
c13182ef
MK
66that occurred from
67.BR dlopen (),
68.BR dlsym ()
3f4c09d0 69.BR dlvsym (),
c13182ef 70or
1e321034 71.BR dlclose ()
fea681da 72since the last call to
1368e847 73.BR dlerror ().
fea681da
MK
74It returns NULL if no errors have occurred since initialization or since
75it was last called.
73d8cece 76.SS dlopen()
fea681da 77The function
d355f1ed 78.BR dlopen ()
43151de3
MK
79loads the dynamic shared object (shared library)
80file named by the null-terminated
fea681da
MK
81string
82.I filename
43151de3 83and returns an opaque "handle" for the loaded object.
fea681da
MK
84If
85.I filename
86is NULL, then the returned handle is for the main program.
87If
88.I filename
89contains a slash ("/"), then it is interpreted as a (relative
90or absolute) pathname.
43151de3 91Otherwise, the dynamic linker searches for the object as follows
fea681da
MK
92(see
93.BR ld.so (8)
94for further details):
86100362 95.IP o 4
fea681da
MK
96(ELF only) If the executable file for the calling program
97contains a DT_RPATH tag, and does not contain a DT_RUNPATH tag,
98then the directories listed in the DT_RPATH tag are searched.
99.IP o
65f6a3ee 100If, at the time that the program was started, the environment variable
0daa9e92 101.B LD_LIBRARY_PATH
65f6a3ee 102was defined to contain a colon-separated list of directories,
fea681da 103then these are searched.
8ac45f42 104(As a security measure, this variable is ignored for set-user-ID and
880f5b4b 105set-group-ID programs.)
fea681da
MK
106.IP o
107(ELF only) If the executable file for the calling program
108contains a DT_RUNPATH tag, then the directories listed in that tag
109are searched.
110.IP o
111The cache file
0daa9e92 112.I /etc/ld.so.cache
fea681da
MK
113(maintained by
114.BR ldconfig (8))
115is checked to see whether it contains an entry for
116.IR filename .
117.IP o
118The directories
c13182ef
MK
119.I /lib
120and
121.I /usr/lib
fea681da
MK
122are searched (in that order).
123.PP
43151de3
MK
124If the object specified by
125.I filename
126has dependencies on other shared objects,
fea681da 127then these are also automatically loaded by the dynamic linker
c13182ef
MK
128using the same rules.
129(This process may occur recursively,
43151de3 130if those objects in turn have dependencies, and so on.)
fea681da 131.PP
336e88f0 132One of the following two values must be included in
cf2789f1 133.IR flags :
336e88f0 134.TP
fea681da 135.B RTLD_LAZY
c13182ef 136Perform lazy binding.
a3a11667 137Only resolve symbols as the code that references them is executed.
336e88f0 138If the symbol is never referenced, then it is never resolved.
33a0ccb2 139(Lazy binding is performed only for function references;
336e88f0 140references to variables are always immediately bound when
43151de3 141the shared object is loaded.)
336e88f0 142.TP
fea681da 143.B RTLD_NOW
336e88f0 144If this value is specified, or the environment variable
fea681da 145.B LD_BIND_NOW
aa796481 146is set to a nonempty string,
43151de3 147all undefined symbols in the shared object are resolved before
d355f1ed 148.BR dlopen ()
c13182ef
MK
149returns.
150If this cannot be done, an error is returned.
fea681da 151.PP
dfacdd0a 152Zero or more of the following values may also be ORed in
cf2789f1 153.IR flags :
336e88f0 154.TP
fea681da 155.B RTLD_GLOBAL
43151de3 156The symbols defined by this shared object will be
fe854f15 157made available for symbol resolution of subsequently loaded shared objects.
c13182ef 158.TP
336e88f0 159.B RTLD_LOCAL
c13182ef 160This is the converse of
336e88f0
MK
161.BR RTLD_GLOBAL ,
162and the default if neither flag is specified.
43151de3
MK
163Symbols defined in this shared object are not made available to resolve
164references in subsequently loaded shared objects.
336e88f0 165.TP
c10859eb 166.BR RTLD_NODELETE " (since glibc 2.2)"
43151de3 167Do not unload the shared object during
336e88f0 168.BR dlclose ().
43151de3
MK
169Consequently, the object's static variables are not reinitialized
170if the object is reloaded with
336e88f0
MK
171.BR dlopen ()
172at a later time.
173This flag is not specified in POSIX.1-2001.
174.\" (But it is present on Solaris.)
175.TP
c10859eb 176.BR RTLD_NOLOAD " (since glibc 2.2)"
43151de3
MK
177Don't load the shared object.
178This can be used to test if the object is already resident
336e88f0 179.RB ( dlopen ()
43151de3
MK
180returns NULL if it is not, or the object's handle if it is resident).
181This flag can also be used to promote the flags on a shared object
336e88f0 182that is already loaded.
43151de3 183For example, a shared object that was previously loaded with
336e88f0 184.B RTLD_LOCAL
3b777aff 185can be reopened with
336e88f0
MK
186.BR RTLD_NOLOAD\ |\ RTLD_GLOBAL .
187This flag is not specified in POSIX.1-2001.
188.\" (But it is present on Solaris.)
189.\"
bba06189
MK
190.TP
191.BR RTLD_DEEPBIND " (since glibc 2.3.4)"
c13182ef 192.\" Inimitably described by UD in
a3a11667 193.\" http://sources.redhat.com/ml/libc-hacker/2004-09/msg00083.html.
c13182ef 194Place the lookup scope of the symbols in this
43151de3
MK
195shared object ahead of the global scope.
196This means that a self-contained object will use
c13182ef 197its own symbols in preference to global symbols with the same name
43151de3 198contained in objects that have already been loaded.
bba06189 199This flag is not specified in POSIX.1-2001.
fea681da
MK
200.PP
201If
202.I filename
b437fdd9 203is NULL, then the returned handle is for the main program.
fea681da 204When given to
d355f1ed 205.BR dlsym (),
fea681da 206this handle causes a search for a symbol in the main program,
43151de3
MK
207followed by all shared objects loaded at program startup,
208and then all shared objects loaded by
d355f1ed 209.BR dlopen ()
fea681da 210with the flag
a5e0a0e4 211.BR RTLD_GLOBAL .
fea681da 212.PP
43151de3
MK
213External references in the shared object are resolved using the
214shared objects in that object's dependency list and any other
215objects previously opened with the
fea681da
MK
216.B RTLD_GLOBAL
217flag.
2bc2f479
MK
218If the executable was linked with the flag "\-rdynamic"
219(or, synonymously, "\-\-export\-dynamic"),
fea681da 220then the global symbols in the executable will also be used
43151de3 221to resolve references in a dynamically loaded shared object.
fea681da 222.PP
43151de3 223If the same shared object is loaded again with
d355f1ed 224.BR dlopen (),
43151de3 225the same object handle is returned.
c13182ef 226The dl library maintains reference
43151de3 227counts for object handles, so a dynamically loaded shared object is not
fea681da 228deallocated until
d355f1ed 229.BR dlclose ()
fea681da 230has been called on it as many times as
d355f1ed 231.BR dlopen ()
c13182ef
MK
232has succeeded on it.
233The
86100362 234.BR _init ()
33a0ccb2 235routine, if present, is called only once.
c13182ef 236But a subsequent call with
fea681da 237.B RTLD_NOW
9c169754 238may force symbol resolution for a shared object earlier loaded with
fea681da
MK
239.BR RTLD_LAZY .
240.PP
241If
d355f1ed 242.BR dlopen ()
fea681da 243fails for any reason, it returns NULL.
9c169754 244.\"
efdd68a5
MK
245.SS dlmopen()
246This function performs the same task as
247.BR dlopen ()\(emthe
248.I filename
249and
250.I flags
65175b1d
MK
251arguments, as well as the return value, are the same,
252except for the differences noted below.
253
254The
255.BR dlmopen ()
256function differs from
257.BR dlopen ()
258primarily in that it accepts an additional argument,
efdd68a5 259.IR lmid ,
9c169754
MK
260that specifies the link-map list (also referred to as a
261.IR namespace )
262in which the shared object should be loaded.
efdd68a5
MK
263(By comparison,
264.BR dlopen ()
9c169754 265adds the dynamically loaded shared object to the same namespace as
efdd68a5
MK
266the shared object from which the
267.BR dlopen ()
268call is made.)
9c169754
MK
269The
270.I Lmid_t
271type is an opaque handle that refers to a namespace.
efdd68a5
MK
272
273The
274.I lmid
9c169754 275argument is either the ID of an existing namespace
efdd68a5
MK
276.\" FIXME: Is using dlinfo() RTLD_DI_LMID the right technique?
277(which can be obtained using the
278.BR dlinfo (3)
279.B RTLD_DI_LMID
280request) or one of the following special values:
281.TP
282.B LM_ID_BASE
9c169754
MK
283Load the shared object in the initial namespace
284(i.e., the application's namespace).
efdd68a5
MK
285.TP
286.B LM_ID_NEWLM
9c169754
MK
287Create a new namespace and load the shared object in that namespace.
288The object must have been correctly
289(statically) linked
290to reference all of the other shared objects that it requires,
291since the new namespace is initially empty.
65175b1d
MK
292.PP
293Note the following restrictions for
294.BR dlmopen ():
295.IP * 3
efdd68a5
MK
296The glibc implementation supports a maximum of
297.\" DL_NNS
9c169754 29816 namespaces.
65175b1d
MK
299.IP *
300.\" dlerror(): "invalid mode"
301The value
302.BR RTLD_GLOBAL
303cannot be specified in
304.IR flags .
305More generally, the
306.BR RTLD_GLOBAL
307flag can be used with
308.BR dlopen ()
309.\" Otherwise: one gets SIGSEGV.
310only when loading a library into the initial namespace.
311.IP *
312.\" dlerror(): "invalid namespace"
313If
314.I handle
315is NULL, then the only permitted value for
316.I lmid
317is
318.BR LM_ID_BASE .
9c169754 319.\"
73d8cece 320.SS dlsym()
fea681da 321The function
d355f1ed 322.BR dlsym ()
43151de3 323takes a "handle" of a dynamic loaded shared object returned by
28d88c17
MK
324.BR dlopen ()
325and the
326null-terminated symbol name, returning the address where that symbol is
c13182ef
MK
327loaded into memory.
328If the symbol is not found, in the specified
43151de3 329object or any of the shared objects that were automatically loaded by
d355f1ed 330.BR dlopen ()
43151de3 331when that object was loaded,
d355f1ed 332.BR dlsym ()
fea681da
MK
333returns NULL.
334(The search performed by
d355f1ed 335.BR dlsym ()
43151de3 336is breadth first through the dependency tree of these shared objects.)
fea681da
MK
337Since the value of the symbol could actually be NULL (so that a
338NULL return from
d355f1ed 339.BR dlsym ()
fea681da
MK
340need not indicate an error), the correct way to test for an error
341is to call
d355f1ed 342.BR dlerror ()
fea681da 343to clear any old error conditions, then call
d355f1ed 344.BR dlsym (),
fea681da 345and then call
d355f1ed 346.BR dlerror ()
fea681da
MK
347again, saving its return value into a variable, and check whether
348this saved value is not NULL.
349.PP
fad3d64e
MK
350There are two special pseudo-handles:
351.TP
fea681da 352.B RTLD_DEFAULT
fad3d64e 353Find the first occurrence of the desired symbol
43151de3 354using the default shared object search order.
99175a58
MK
355The search will include global symbols in the executable
356and its dependencies,
43151de3 357as well as symbols in shared objects that were dynamically loaded with the
99175a58
MK
358.BR RTLD_GLOBAL
359flag.
fad3d64e
MK
360.TP
361.BR RTLD_NEXT
b6fe25f7 362Find the next occurrence of the desired symbol in the search order
43151de3 363after the current object.
c13182ef 364This allows one to provide a wrapper
43151de3
MK
365around a function in another shared object, so that, for example,
366the definition of a function in a preloaded shared object
4251757a
MK
367(see
368.B LD_PRELOAD
369in
370.BR ld.so (8))
43151de3 371can find and invoke the "real" function provided in another shared object
4251757a
MK
372(or for that matter, the "next" definition of the function in cases
373where there are multiple layers of preloading).
3f4c09d0
MK
374.SS dlvsym()
375The function
376.BR dlvsym ()
377does the same as
378.BR dlsym ()
379but takes a version string as an additional argument.
73d8cece 380.SS dlclose()
fea681da 381The function
d355f1ed 382.BR dlclose ()
43151de3
MK
383decrements the reference count on the
384dynamically loaded shared object referred to by
fea681da 385.IR handle .
4a1af09b 386If the reference count drops to zero,
43151de3 387then the object is unloaded.
cc2ddf2f
MK
388All shared objects that were automatically loaded when
389.BR dlopen ()
390was invoked on the object referred to by
391.I handle
392are recursively closed in the same manner.
fea681da
MK
393.LP
394The function
d355f1ed 395.BR dlclose ()
c7094399 396returns 0 on success, and nonzero on error.
6445992d
MK
397.SH VERSIONS
398.BR dlopen (),
399.BR dlsym (),
400.BR dlclose (),
401and
402.BR dlerror ()
403are present in glibc 2.0 and later.
efdd68a5
MK
404.BR dlmopen ()
405first appeared in glibc 2.3.4.
6445992d
MK
406.BR dlvsym ()
407first appeared in glibc 2.1.
47297adb 408.SH CONFORMING TO
2b2581ee
MK
409POSIX.1-2001 describes
410.BR dlclose (),
411.BR dlerror (),
412.BR dlopen (),
413and
414.BR dlsym ().
3f4c09d0 415The
efdd68a5
MK
416.BR dlmopen ()
417and
3f4c09d0 418.BR dlvsym ()
efdd68a5 419functions are GNU extensions.
2b2581ee 420.SH NOTES
097585ed
MK
421The symbols
422.B RTLD_DEFAULT
423and
424.B RTLD_NEXT
425are defined by
2b2581ee 426.I <dlfcn.h>
c3dfd2c8
MK
427only when
428.B _GNU_SOURCE
429was defined before including it.
2b2581ee
MK
430.\" .LP
431.\" The string returned by
432.\" .BR dlerror ()
433.\" should not be modified.
434.\" Some systems give the prototype as
435.\" .sp
436.\" .in +5
437.\" .B "const char *dlerror(void);"
438.\" .in
439
440Since glibc 2.2.3,
441.BR atexit (3)
442can be used to register an exit handler that is automatically
43151de3 443called when a shared object is unloaded.
9c169754
MK
444.\"
445.SS dlmopen() and namespaces
446A link-map list defines an isolated namespace for the
447resolution of symbols by the dynamic linker.
448Within a namespace,
449dependent shared objects are implicitly loaded according to the usual rules,
450and symbol references are likewise resolved according to the usual rules,
451but such resolution is confined to the definitions provided by the
452objects that have been (explicitly and implicitly) loaded into the namespace.
453
454The
455.BR dlmopen ()
456function permits object-load isolation\(emthe ability
457to load a shared object in a new namespace without
458exposing the rest of the application to the symbols
459made available by the new object.
460Note that the use of the
461.B RTLD_LOCAL
462flag is not sufficient for this purpose,
463since it prevents a shared object's symbols from being available to
464.I any
465other shared object.
466In some cases,
467we may want to make the symbols provided by a dynamically
43151de3 468loaded shared object available to (a subset of) other shared objects
9c169754 469without exposing those symbols to the entire application.
65175b1d
MK
470.\" FIXME It's still not clear to me what dlmopen() gives us that
471.\" RTLD_LOCAL did not...
9c169754
MK
472
473Possible uses of
474.BR dlmopen ()
475are plugins where the author of the plugin-loading framework
476can't trust the plugin authors and does not wish
477any undefined symbols from the plugin framework to be resolved to plugin
478symbols.
479Another use is to load the same object more than once.
480Without the use of
481.BR dlopen (),
482this would require the creation of distinct copies of the shared object file.
483Using
484.BR dlopen (),
485this can be achieved by loading the same shared object file into
486different namespaces.
487.\"
e8290357
MK
488.SS The obsolete symbols _init() and _fini()
489The linker recognizes special symbols
490.B _init
491and
492.BR _fini .
493If a dynamically loaded shared object exports a routine named
494.BR _init (),
495then that code is executed after the loading, before
496.BR dlopen ()
497returns.
498If the shared object exports a routine named
499.BR _fini (),
500then that routine is called just before the object is unloaded.
501In case you need to avoid linking against the system startup files,
502this can be done by using the
503.BR gcc (1)
504.I \-nostartfiles
505command-line option.
506.LP
507Using these routines, or the gcc
508.B \-nostartfiles
509or
510.B \-nostdlib
511options, is not recommended.
512Their use may result in undesired behavior,
513since the constructor/destructor routines will not be executed
514(unless special measures are taken).
515.\" void _init(void) __attribute__((constructor));
516.\" void _fini(void) __attribute__((destructor));
517.LP
518Instead, shared objects should export routines using the
519.B __attribute__((constructor))
520and
521.B __attribute__((destructor))
522function attributes.
523See the gcc info pages for information on these.
524Constructor routines are executed before
525.BR dlopen ()
526returns, and destructor routines are executed before
527.BR dlclose ()
528returns.
529.\"
2b2581ee
MK
530.SS History
531The dlopen interface standard comes from SunOS.
6445992d 532That system does not have
efdd68a5
MK
533.BR dlvsym (),
534but does have
535.BR dlmopen ().
fea681da 536.SH EXAMPLE
9ff08aad 537Load the math library, and print the cosine of 2.0:
fea681da 538.nf
9ff08aad 539
fea681da 540#include <stdio.h>
b28f7a67 541#include <stdlib.h>
fea681da
MK
542#include <dlfcn.h>
543
c13182ef
MK
544int
545main(int argc, char **argv)
cf0a9ace 546{
fea681da
MK
547 void *handle;
548 double (*cosine)(double);
549 char *error;
550
cf0a9ace 551 handle = dlopen("libm.so", RTLD_LAZY);
fea681da 552 if (!handle) {
31a6818e 553 fprintf(stderr, "%s\en", dlerror());
4c44ffe5 554 exit(EXIT_FAILURE);
fea681da
MK
555 }
556
557 dlerror(); /* Clear any existing error */
c73d7281 558
29965345 559 cosine = (double (*)(double)) dlsym(handle, "cos");
c73d7281 560
daf28a2b 561 /* According to the ISO C standard, casting between function
4318a7d0
MK
562 pointers and 'void *', as done above, produces undefined results.
563 POSIX.1-2003 and POSIX.1-2008 accepted this state of affairs and
564 proposed the following workaround:
29965345
MK
565
566 *(void **) (&cosine) = dlsym(handle, "cos");
567
4318a7d0
MK
568 This (clumsy) cast conforms with the ISO C standard and will
569 avoid any compiler warnings.
29965345 570
daf28a2b
MK
571 The 2013 Technical Corrigendum to POSIX.1-2008 (a.k.a.
572 POSIX.1-2013) improved matters by requiring that conforming
573 implementations support casting 'void *' to a function pointer.
574 Nevertheless, some compilers (e.g., gcc with the '-pedantic'
575 option) may complain about the cast used in this program. */
576.\" http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08
577.\" http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07
5e0622ba 578.\" http://austingroupbugs.net/view.php?id=74
c73d7281 579
aefd6f89 580 error = dlerror();
3487d63b 581 if (error != NULL) {
31a6818e 582 fprintf(stderr, "%s\en", error);
4c44ffe5 583 exit(EXIT_FAILURE);
fea681da
MK
584 }
585
31a6818e 586 printf("%f\en", (*cosine)(2.0));
fea681da 587 dlclose(handle);
5bc8c34c 588 exit(EXIT_SUCCESS);
fea681da 589}
fea681da 590.fi
fea681da
MK
591.PP
592If this program were in a file named "foo.c", you would build the program
593with the following command:
a6e2f128 594.in +4n
fea681da 595.LP
f4398177 596 gcc \-rdynamic \-o foo foo.c \-ldl
a6e2f128 597.in
fea681da 598.PP
43151de3 599Shared objects exporting (the obsolete)
86100362 600.BR _init ()
988db661 601and
86100362
MK
602.BR _fini ()
603will want to be compiled as
c6fa0841
MK
604follows, using
605.I bar.c
606as the example name:
a6e2f128 607.in +4n
fea681da 608.LP
f4398177 609 gcc \-shared \-nostartfiles \-o bar bar.c
a6e2f128 610.in
47297adb 611.SH SEE ALSO
fea681da
MK
612.BR ld (1),
613.BR ldd (1),
5d95b7d8 614.BR pldd (1),
fea681da 615.BR dl_iterate_phdr (3),
6c46d3bc 616.BR dladdr (3),
46db2df1 617.BR dlinfo (3),
c18ecec9 618.BR rtld-audit (7),
fea681da 619.BR ld.so (8),
173fe7e7
DP
620.BR ldconfig (8)
621
7e936c29 622gcc info pages, ld info pages