From fd4074472e9ad1ab43fe3c0be1485762859d7254 Mon Sep 17 00:00:00 2001 From: jdp Date: Wed, 7 Apr 1999 02:43:11 +0000 Subject: 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. --- libexec/rtld-elf/rtld.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libexec') 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; -- cgit v1.1