tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: fixing libpthread noload, another approach
On Tue, Feb 05, 2013 at 11:30:37AM +0000, Emmanuel Dreyfus wrote:
> On Tue, Feb 05, 2013 at 11:32:06AM +0100, Joerg Sonnenberger wrote:
> > There won't be a generic solution, since any approach requires at the
> > very least an audit of the code to see whether it really requires
> > threading. Just overriding it would otherwise just move from an explicit
> > early error to much harder to diagnose problems later.
>
> There is no such thing like an explicit early error for now. dlopen
> fails and the process survives, most of the time without reporting the
> dlerror() string. On the two time I have hit that problem, I was only
> able to get a diagnostic with ktrace.
That's an application bug.
> On the early or late error, if RTLD_LAZY is used and something uses
> dlsym() to call pthread_create(), then your approach will cause a
> late error. This is exactly the situation I get by modifying ld.elf_so,
> so if it is acceptable for your solution, it is also for mine.
RTLD_LAZY is unrelated, you still have to link against libpthread in
first place, otherwise e.g. -Wl,-z,defs will fail.
Joerg
Home |
Main Index |
Thread Index |
Old Index