freebsd equiv of libdl.a (load shared libs)

Dan Nelson dnelson at allantgroup.com
Wed Mar 26 15:18:04 PDT 2008


In the last episode (Mar 26), Steve Franks said:
> I am porting a linux app which is looking for libdl.a (which I
> understand from googling is related to loading of shared libs).  The
> app makes a libusb-based shared lib.  FreeBSD uses shared libs, so I
> assume there is equivalent functionality somewhere.  I also see
> libdl.a in /compat/linux/lib, but I assume if I link a native FreeBSD
> app against this, fireworks will be the only result.  I further
> assume since I got no error from gcc, that some freebsd header
> actally points to the exact functions expected in libdl.a, so they
> are in there somewhere....

The dlopen/dlsym functions are built into libc on FreeBSD, so there's
no need for a libdl:


DLOPEN(3)              FreeBSD Library Functions Manual              DLOPEN(3)

NAME
     dlopen, dlsym, dlfunc, dlerror, dlclose -- programmatic interface to the
     dynamic linker

LIBRARY
     Standard C Library (libc, -lc)


-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list