summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-04-07 02:43:11 +0000
committerjdp <jdp@FreeBSD.org>1999-04-07 02:43:11 +0000
commitfd4074472e9ad1ab43fe3c0be1485762859d7254 (patch)
treef346235f0243c542ee429cf4148837fc8c63fced /libexec
parent7c9bf17e255d3dab0dd8586726cc51fedda0b184 (diff)
downloadFreeBSD-src-fd4074472e9ad1ab43fe3c0be1485762859d7254.zip
FreeBSD-src-fd4074472e9ad1ab43fe3c0be1485762859d7254.tar.gz
Add a new function dlversion() which returns the version number of
the dynamic linker in the same form as __FreeBSD_version. This is mainly intended for checking the dynamic linker version during a make world.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index f5bad83..dc2c83b 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: rtld.c,v 1.16 1999/04/04 06:01:09 peter Exp $
+ * $Id: rtld.c,v 1.17 1999/04/05 02:36:40 jdp Exp $
*/
/*
@@ -52,6 +52,14 @@
#include "rtld.h"
/*
+ * Version number queried by dlversion(). The first 3 digits represent
+ * the base FreeBSD release. The last 3 digits are a serial number.
+ * Increase this when you fix a significant bug or add a significant
+ * feature.
+ */
+#define DL_VERSION 400001
+
+/*
* Debugging support.
*/
@@ -152,6 +160,7 @@ static func_ptr_type exports[] = {
(func_ptr_type) &dlopen,
(func_ptr_type) &dlsym,
(func_ptr_type) &dladdr,
+ (func_ptr_type) &dlversion,
NULL
};
@@ -1273,6 +1282,12 @@ dlsym(void *handle, const char *name)
}
int
+dlversion(void)
+{
+ return DL_VERSION;
+}
+
+int
dladdr(const void *addr, Dl_info *info)
{
const Obj_Entry *obj;
OpenPOWER on IntegriCloud