Who's Online |
51 user(s) are online ( 32 user(s) are browsing Forums)
Members: 1
Guests: 50
Arthas,
more...
|
|
|
|
need clarify about libdl and all dlopen/dlclose calls
|
|
Home away from home 
Joined: 2007/9/11 12:31 Last Login
: 6/22 18:37
From Russia
Group:
Registered Users
|
@All Find out lately that one project i want to build rely on usage of those dlopen()/dlclose() and dlsym() functions, and on linking line use "-ldl" for.
But i seems missed it in my current SDK.
One i found is on os4depot "libdl" from Chris Young from 2009. But i not sure if it expected that we use this one only ? No other ones ?
Or maybe there some way to use those functions without having "-ldl" but having dlopen/dlclose/dlsym working as expected (like adding some proto includes, etc ?)
I also remember (But can be very wrong), that libdl.a were presented in some older SDK versions, while for now seems not ?
EDIT: i found that newlib/include/ have dlfcn.h file, which contain defines for those functions, but i can't find in whole SDK libdl.a
|
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Just popping in 
Joined: 2006/12/22 10:43 Last Login
: 6/23 7:21
From Germany
Group:
Registered Users
|
libdl is for using functions from shared object libraries. libdl itself is a shared object, which is why you can't find it in the SDK. It resides in SYS:SObjs/
To make use of it, you have to use the linker option -use-dynld, then you can pass -ldl and use its functions.
|
AmigaOS 4 core developer www.os4welt.de - Die deutsche AmigaOS 4 Gemeinschaft "In the beginning was CAOS.." -- Andy Finkel, 1988 (ViewPort article, Oct. 1993)
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Home away from home 
Joined: 2007/9/11 12:31 Last Login
: 6/22 18:37
From Russia
Group:
Registered Users
|
@Cyborg Something still wrong then.when you use -dl and -use-dynld this bring errors about missing -ldl. And if SDK didnt contain libdl.a or libdl.so, then its wrong, because you cant build any code which use it on anything, but only directly on aos4. Sdk already contain lot of sobjs then why no libdl.so then ?
For example, sdk come with libc.so. you building code with it, but then running it on os4 with libc.so coming with os4 instalation make thing not work. So there already problems, and i need to create sobjs dir and put there libc.so from sdk.
In other words cant see why there no libdl.so then in sdk as well
|
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Just popping in 
Joined: 2021/7/23 21:46 Last Login
: Today 0:34
From Älvsbyn, Sweden
Group:
Registered Users
|
@kas1e You also have DLOpen, DLClose, DLSym in elf.library, don't know why it is there too, might be that they uses some other kind of arguments. I do have libdl.so in sys:sobjs, is it perhaps an older version of elf.library.kmod in kickstart? elf library.kmod is from 27.10.2019 version 53.30 libdl.so is from 9.4.2013 version 53.4 I would suggest to try with elf.library.
|
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Just popping in 
Joined: 2006/12/22 10:43 Last Login
: 6/23 7:21
From Germany
Group:
Registered Users
|
|
AmigaOS 4 core developer www.os4welt.de - Die deutsche AmigaOS 4 Gemeinschaft "In the beginning was CAOS.." -- Andy Finkel, 1988 (ViewPort article, Oct. 1993)
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Home away from home 
Joined: 2006/11/26 21:45 Last Login
: Today 7:51
From a dying planet
Group:
Registered Users
|
@trgswe @Cyborg @kas1e
Was this resolved?
I'm still wondering if elf.library took over the libdl functionality (so we can get rid of this library) or if it's a coincidence with rather unfortunate naming?
Thanks
|
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Home away from home 
Joined: 2007/9/11 12:31 Last Login
: 6/22 18:37
From Russia
Group:
Registered Users
|
@Raziel I just use libdl from os4depot. Because seems in SDK, while proto files present, those dl functions only used for dynamic linking (so when sobjes in use). For static linking SDK do not have libdl.a , so i use one from os4depot.
|
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Home away from home 
Joined: 2006/11/26 21:45 Last Login
: Today 7:51
From a dying planet
Group:
Registered Users
|
@kas1e
Thanks, creating a link to the SOBJS: file was sufficient to make it find it (for dynamic builds) I'm going to try it with ScummVM, maybe it'll give more stability...
|
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Home away from home 
Joined: 2006/12/4 23:15 Last Login
: 5/31 18:23
Group:
Registered Users
|
@Raziel Quote: I'm still wondering if elf.library took over the libdl functionality (so we can get rid of this library) or if it's a coincidence with rather unfortunate naming?
libdl is implemented by calls to elf library. There no name clash as the low level elf.library calls have a different case to libdl.
|
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
Posted on: 5/14 19:25
#10
|
Home away from home 
Joined: 2006/11/26 21:45 Last Login
: Today 7:51
From a dying planet
Group:
Registered Users
|
@broadblues
I'm sorry, I didn't quite understand.
Does that mean libdl is obsolete because it's superseded by elf.library functions? Or do the elf.library dl implementation serve a similar but not the same purpose?
Or in short...can libdl be removed?
|
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
Posted on: 5/14 23:08
#11
|
Just popping in 
Joined: 2021/7/23 21:46 Last Login
: Today 0:34
From Älvsbyn, Sweden
Group:
Registered Users
|
@Raziel AFAIU libdl.a and libdl.so all internally calls elf.library.kmod, it is simply to make ports easier, since you can use makefiles etc which uses -ldl for linux etc.
|
|
|
|
Re: need clarify about libdl and all dlopen/dlclose calls
|
|
Home away from home 
Joined: 2006/11/26 21:45 Last Login
: Today 7:51
From a dying planet
Group:
Registered Users
|
@trgswe
Oh, ok...
Hmm, have to find out why .so access crashes with -ldl in place and doesn't if it's not used.
Maybe I'm mixing stuff again?
|
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg
|
|
Currently Active Users Viewing This Thread:
1
(
0 members
and 1 Anonymous Users
)
|
|
|