[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: dlopen fails from static binary
On Mon, Apr 18, 2016 at 09:57:22AM +0200, Martin Husemann wrote:
> Upon successful completion, dlopen() shall return a symbol table
> handle. If file cannot be found, cannot be opened for reading, is not
> of an appropriate executable object file format for processing by
> dlopen(), or if an error occurs during the process of loading file or
> relocating its symbolic references, dlopen() shall return a null
> pointer. More detailed diagnostic information shall be available
> through dlerror().
And dlerror returns dlfcn_error if statically linked:
static char dlfcn_error = "Service unavailable";
Hence the thing is already correct. Perhaps the message could
be improved? "dlopen() is not available in statically linked binaries".
Or just fail with an #error when trying to build statically?
Main Index |
Thread Index |