This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: lazy library loading


On Monday 18 February 2013 14:08:57 Carlos O'Donell wrote:
> So the next question I have is: What problem are you trying to solve?

thinking a bit out loud, but this looks like it could be useful to replace the 
manual dlopen() management that many projects implement

for example, in wine, they have a lot of modules that support various backends 
(audio/etc...).  at runtime, they try to dlopen() things to see what 
will/won't work, and gracefully move on when third party libs aren't 
available.

i know in the gdb sim i've done something similar -- i don't want my sim to 
always be linked against SDL, but if it's available, i want the functionality 
to also be available (in this case, simulating a graphics display).

then again, the error paths here aren't graceful.  if i try to run SDL_init() 
and the lib can't be loaded, i'm guessing i get back an abort().  i'd 
certainly prefer to have my code instead issue a warning "unable to initialize 
graphics display" (and internally, i'd have it issue a hardware error similar 
to how the real hardware would work), but otherwise continue working fine.  so 
maybe it's not useful to these scenarios.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]