tech-userlevel archive

[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 07:17:09AM +0000, Emmanuel Dreyfus wrote:
> Hi
> On netbsd-6, using dlopen in a static binary will return NULL without 
> setting errno.
> It seems wrong.

Yes, but different than you think, see man dlopen:

     (These functions are not in a library.  They are included in every
     dynamically linked program automatically.)

> Is dlopen really supposed ot fail when called from 
> static binary? In that case errno should be set, but to what value?
> Or perhaps we could support dlopen from static binary?

We should fail to link in this case. Where does the dlopen stub come


Home | Main Index | Thread Index | Old Index