This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add hidden definition for __clock_gettime
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 31 May 2013 23:29:32 +0530
- Subject: Re: [PATCH] Add hidden definition for __clock_gettime
- References: <20130521145455 dot GL8927 at spoyarek dot pnq dot redhat dot com> <20130523191651 dot 0C1F82C0A1 at topped-with-meat dot com>
On Thu, May 23, 2013 at 12:16:51PM -0700, Roland McGrath wrote:
> I don't understand why we have __clock_gettime at all given the status quo.
> That is, both __clock_gettime and clock_gettime are strong definitions, so
> there is no benefit whatsoever in using the __ name rather than the public
> name. If there are calls to __clock_gettime from the implementations of
> functions outside the name space that includes clock_gettime, then things
> are already wrong. So first we should resolve that: either we need
> __clock_gettime as the strong definition and clock_gettime as only a weak
> alias, or we don't need __clock_gettime at all.
librt has clock_* ifunc as for compatibility and it patches the call
through to __clock_gettime, so I was wrong in thinking that it's not
used. I'll fix this as well as other clock_* functions to make the __
variants as the strong definitions and the clock_* as weak aliases.
Siddhesh