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: pthread_cancel and static libgcc libgcc_eh without libc bits



On 13/10/2016 16:44, Waldemar Brodkorb wrote:
> Hi,
> sylvain.bertrand@gmail.com wrote,
> 
>> Hi,
>>
>> Correct me if I'm wrong: pthread_cancel does work properly when linking a shared nptl lib with
>> static libgcc and libgcc_eh, which where compiled without their libc bits?
>>
>> Or the shared libgcc_s is _mandatory_ for pthread_cancel to work in a shared nptl lib?
> 
> I asked a similar question once. See the archives.
> libgcc_s is mandatory and is used via dlopen.

If you build pthread_cancel.c as a shared library it will call
'pthread_cancel_init' which in in the end dlopen libgcc_s.so.

I think it would be feasible to add support for static libcgcc
on pthread_cancel_init by first trying to get unwind symbol
using __libc_dlsym (RTLD_DEFAULT, ...)  and trying to dlopen
just if it is not found.


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