Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
56 user(s) are online (39 user(s) are browsing Forums)

Members: 2
Guests: 54

rjd324, VooDoo, more...

Headlines

 
  Register To Post

need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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

Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Just popping in
Just popping in


See User information
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)
Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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

Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Just popping in
Just popping in


See User information
@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.

Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Just popping in
Just popping in


See User information
@kas1e

Ok, what you then probably want is to install http://os4depot.net/?function=showfil ... nt/library/misc/libdl.lha in your SDK.

AmigaOS 4 core developer
www.os4welt.de - Die deutsche AmigaOS 4 Gemeinschaft

"In the beginning was CAOS.."
-- Andy Finkel, 1988 (ViewPort article, Oct. 1993)
Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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
Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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.

Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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
Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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.

Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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
Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Just popping in
Just popping in


See User information
@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.

Go to top
Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


See User information
@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
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project