[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Do opaque struct changes break C library ABIs



Le vendredi 17 mai 2013 07:17:48, Guillem Jover a écrit :
> (…) I agree dlopen()ing shared libraries in general should not
> be supported (I'd even go further and say this should be outright
> banned, given the pain it causes, and optional library support should
> always be implemented by loading a plugin properly linked against such
> library with an ABI under the control of the program loading it).

I know of at least one case where I think it makes sense. TCC compiler uses 
dlopen to run a C file as a script. It compiles to memory and then dlopen all 
the libraries it needs and resolve the symbol itself. If the library in 
question is also used by the compiler (eg. glibc), it's going to be opened 
twice.

However the dlopening is done shortly after the compiler is run so it's very 
unlikely that the dlopened version of the library is different than the one 
loaded by the dynamic linker so I don't think it's a problem in practice.

Surely such a case shouldn't be banned.

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


Reply to: