I know FreeBSD has dlopen(), dlsym(), etc... but will it ever have
libdl or at least a port of it?
Thanks
David
I know FreeBSD has dlopen(), dlsym(), etc... but will it ever have
libdl or at least a port of it?
Thanks
David
Compile this C source into a library.
------ (begin) ------
void *dlopen(const char *, int);
void *dlsym(void *, const char *);
const char *dlerror(void);
int dlclose(void *handle);
------- (end) -------
Though I don't see why you need it.
> I know FreeBSD has dlopen(), dlsym(), etc... but will it ever have
> libdl or at least a port of it?
--
- Donn
> Just write a library with weak symbols for them.
> Compile this C source into a library.
> ------ (begin) ------
> void *dlopen(const char *, int);
> void *dlsym(void *, const char *);
> const char *dlerror(void);
> int dlclose(void *handle);
> ------- (end) -------
> Though I don't see why you need it.
# cd /usr/local/lib
# gcc -shared -Wl,-soname,libdl.so.1 -o libdl.so.1 -x c /dev/null
# ln -s libdl.so.1 libdl.so
Why you would need this? Well, there are some bloated autoconf scripts
which test for a particular feature which is present in a FreeBSD
system, but try to link their test binary against -ldl and so fail.
This is, of course, not a solution, but a good bug-compatibility
`feature' IMO.
--
"Bell Labs Unix -- reach out and grep someone."
I don't understand (nor do I want to understand) autoconf. IQuote:> Why you would need this? Well, there are some bloated autoconf scripts
> which test for a particular feature which is present in a FreeBSD
> system, but try to link their test binary against -ldl and so fail.
> This is, of course, not a solution, but a good bug-compatibility
> `feature' IMO.
That is not a smart test. That is not the fault of autoconf.Quote:>> Why you would need this? Well, there are some bloated autoconf scripts
>> which test for a particular feature which is present in a FreeBSD
>> system, but try to link their test binary against -ldl and so fail.
autoconf lets you roll up just about any test you want. In general,Quote:>> This is, of course, not a solution, but a good bug-compatibility
>> `feature' IMO.
> I don't understand (nor do I want to understand) autoconf. I
>assumed the way autoconf searches for a function in a library is
>by looking at the symbols (man nm).
I am not a particular fan of autoconf, but like most tools, it should
probably be seen as a length of rope. If someone writes a bad autoconf
script which is not portable, the rest of the world should not alter
their operating systems to fit.
--Paul
--
- Donn
# ar r /usr/local/lib/libdl.a
Who wants an empty library to be linked dynamically? ;-)
--
"Bell Labs Unix -- reach out and grep someone."
> That is not a smart test. That is not the fault of autoconf.
I wasn't talking about extending FreeBSD by an empty libdl. ;-) I justQuote:> >> This is, of course, not a solution, but a good bug-compatibility
> >> `feature' IMO.
> > I don't understand (nor do I want to understand) autoconf. I
> >assumed the way autoconf searches for a function in a library is
> >by looking at the symbols (man nm).
> autoconf lets you roll up just about any test you want. In general,
> functions are tested by using them - compiling a code snippet and
> linking with specific libraries. This allows you to also test whether
> the function takes the number and type of arguments you expect.
> I am not a particular fan of autoconf, but like most tools, it should
> probably be seen as a length of rope. If someone writes a bad autoconf
> script which is not portable, the rest of the world should not alter
> their operating systems to fit.
Btw, is -ldl a very Linux specific feature? Or are there many other
OSes that also habe a libdl?
--
"Bell Labs Unix -- reach out and grep someone."
% Btw, is -ldl a very Linux specific feature? Or are there many other
% OSes that also habe a libdl?
There are other OSes which also have libdl.
--
Patrick TJ McPhee
East York Canada
1. Dynamic Link Loader problem
I installed the new XFree 1.3 on my Linux machine today and I'm not
able to run any X program, the problem seems to be with the Dynamic
Loader it reports this:
xterm: can't load library '//libXaw.so.3'
That library exists but it's in /lib/libXaw.so.3
Any help will be apreciated, thanks in advance,
Miguel.
--
Miguel.
2. Formatting partition for solaris
5. dynamic loading vs. dynamic linking
6. Q: which of Intel Zappa/Intel Triton mb?
7. shmem works static-linked, but not dynamic-linked
8. Leafnode 1.4 does not delete old articles?
9. dynamic linking -> static linking == some _smaller_ executables
10. Static linked std libraryes in Dynamic linked libraryes
11. time launching aspect : static link vs dynamic link
12. dynamic linking vs. static linking
13. Dynamic linking and link editor