This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv2,HURD] Add fork hooks for pthread_atfork
- From: Samuel Thibault <samuel dot thibault at gnu dot org>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Justus Winter <4winter at informatik dot uni-hamburg dot de>, bug-hurd at gnu dot org, libc-alpha at sources dot redhat dot com, alicia at ion dot nu
- Date: Tue, 4 Mar 2014 02:40:12 +0100
- Subject: Re: [PATCHv2,HURD] Add fork hooks for pthread_atfork
- Authentication-results: sourceware.org; auth=none
- References: <20110619130724 dot GV6349 at const dot famille dot thibault dot fr> <20130921212355 dot GV30838 at type dot youpi dot perso dot aquilenet dot fr> <20130924210815 dot GA31468 at type dot youpi dot perso dot aquilenet dot fr> <20120510233252 dot GO4259 at type dot famille dot thibault dot fr> <878uvfmwvs dot fsf at kepler dot schwinge dot homeip dot net> <20131220210542 dot 9CD707442F at topped-with-meat dot com> <20140225055509 dot GI6413 at type dot globalsuite dot net> <20140303233652 dot 9AE797444B at topped-with-meat dot com>
Roland McGrath, le Mon 03 Mar 2014 15:36:52 -0800, a Ãcrit :
> > Roland McGrath, le Fri 20 Dec 2013 13:05:42 -0800, a ,Aicrit :
> > > The linker is supposed to define those symbols automagically.
> > > Did it break?
> >
> > We have been having
> >
> > $,1r|
> > checking for sufficient default -shared layout... no
>
> What does this have to do with anything?
It is what makes the Makefile choose between using the empty
shlib-lds/shlib-lds-flags or using the explicit shlib.lds file.
> Are you saying that the linker does not define __start_* and __stop_*
> symbols automagically when it's given a custom linker script?
It seems libc's __start_* and __stop_* symbols get defined automagically
indeed. This however doesn't happen for libpthread apparently:
/usr/src/eglibc-2.18/build-tree/hurd-i386-libc/libpthread/libpthread_pic.a(pt-initialize.os): In function `__pthread_init':
/usr/src/eglibc-2.18/libpthread/./pthread/pt-initialize.c:77: undefined reference to `__stop___pthread_init'
/usr/bin/ld.bfd.real: /usr/src/eglibc-2.18/build-tree/hurd-i386-libc/libpthread/libpthread_pic.a(pt-initialize.os): relocation R_386_GOTOFF against undefined hidden symbol `__stop___pthread_init' can not be used when making a shared object
Now I'm wondering why for instance __start/stop___libc_atexit are
specified. This comes from Ulrich's âPlace __libc_subfreeres,
__libc_atexit, and __libc_thread_subfreeres sections after .jcr
section.â. I don't know what this is really useful for.
Samuel