rtld.1 (90755) | rtld.1 (99500) |
---|---|
1.\" $FreeBSD: head/libexec/rtld-elf/rtld.1 90755 2002-02-17 07:04:32Z obrien $ | 1.\" $FreeBSD: head/libexec/rtld-elf/rtld.1 99500 2002-07-06 19:19:48Z charnier $ |
2.\" 3.\" Copyright (c) 1995 Paul Kranenburg 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 31.Dd January 28, 2000 32.Dt RTLD 1 33.Os 34.Sh NAME 35.Nm ld-elf.so.1 , 36.Nm rtld 37.Nd run-time link-editor 38.Sh DESCRIPTION | 2.\" 3.\" Copyright (c) 1995 Paul Kranenburg 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 31.Dd January 28, 2000 32.Dt RTLD 1 33.Os 34.Sh NAME 35.Nm ld-elf.so.1 , 36.Nm rtld 37.Nd run-time link-editor 38.Sh DESCRIPTION |
39The |
|
39.Nm | 40.Nm |
40is a self-contained shared object providing run-time | 41utility is a self-contained shared object providing run-time |
41support for loading and link-editing shared objects into a process' 42address space. 43It is also commonly known as the dynamic linker. 44It uses the data structures 45contained within dynamically linked programs to determine which shared 46libraries are needed and loads them using the 47.Xr mmap 2 48system call. 49.Pp 50After all shared libraries have been successfully loaded, 51.Nm 52proceeds to resolve external references from both the main program and 53all objects loaded. 54A mechanism is provided for initialization routines 55to be called on a per-object basis, giving a shared object an opportunity 56to perform any extra set-up before execution of the program proper begins. 57This is useful for C++ libraries that contain static constructors. 58.Pp | 42support for loading and link-editing shared objects into a process' 43address space. 44It is also commonly known as the dynamic linker. 45It uses the data structures 46contained within dynamically linked programs to determine which shared 47libraries are needed and loads them using the 48.Xr mmap 2 49system call. 50.Pp 51After all shared libraries have been successfully loaded, 52.Nm 53proceeds to resolve external references from both the main program and 54all objects loaded. 55A mechanism is provided for initialization routines 56to be called on a per-object basis, giving a shared object an opportunity 57to perform any extra set-up before execution of the program proper begins. 58This is useful for C++ libraries that contain static constructors. 59.Pp |
60The |
|
59.Nm | 61.Nm |
60itself is loaded by the kernel together with any dynamically-linked | 62utility itself is loaded by the kernel together with any dynamically-linked |
61program that is to be executed. 62The kernel transfers control to the 63dynamic linker. 64After the dynamic linker has finished loading, 65relocating, and initializing the program and its required shared 66objects, it transfers control to the entry point of the program. 67.Pp 68To locate the required shared objects in the filesystem, 69.Nm 70may use a 71.Dq hints 72file prepared by the 73.Xr ldconfig 8 74utility. 75.Pp | 63program that is to be executed. 64The kernel transfers control to the 65dynamic linker. 66After the dynamic linker has finished loading, 67relocating, and initializing the program and its required shared 68objects, it transfers control to the entry point of the program. 69.Pp 70To locate the required shared objects in the filesystem, 71.Nm 72may use a 73.Dq hints 74file prepared by the 75.Xr ldconfig 8 76utility. 77.Pp |
78The |
|
76.Nm | 79.Nm |
80utility |
|
77recognizes a number of environment variables that can be used to modify 78its behaviour as follows: 79.Pp 80.Bl -tag -width ".Ev LD_LIBRARY_PATH" 81.It Ev LD_LIBRARY_PATH 82A colon separated list of directories, overriding the default search path 83for shared libraries. 84This is ignored for set-user-ID and set-group-ID programs. --- 76 unchanged lines hidden --- | 81recognizes a number of environment variables that can be used to modify 82its behaviour as follows: 83.Pp 84.Bl -tag -width ".Ev LD_LIBRARY_PATH" 85.It Ev LD_LIBRARY_PATH 86A colon separated list of directories, overriding the default search path 87for shared libraries. 88This is ignored for set-user-ID and set-group-ID programs. --- 76 unchanged lines hidden --- |