diff mbox

Export __vdso_clock_gettime as GLIBC_PRIVATE

Message ID 20150122133557.515f55dd@redhat.com
State New
Headers show

Commit Message

Siddhesh Poyarekar Jan. 22, 2015, 8:05 a.m. UTC
Hi,

We added vDSO support for time functions on i386 recently, but the
__vdso_clock_gettime symbol was kept as an internal symbol.  This is
fine for glibc as is, but it breaks Fedora builds since rtkaio now
needs access to __vdso_clock_gettime.  I could maintain a patch in
Fedora that exports this symbol as GLIBC_PRIVATE, but I reckon that it
might be more consistent to put it upstream since all of the
architectures that have vDSO time support export the symbol in
GLIBC_PRIVATE already.

Tested on i386 to verify that the build completes successfully.  OK to
commit?

Siddhesh

	* sysdeps/unix/sysv/linux/i386/Versions (GLIBC_PRIVATE): Add
	__vdso_clock_gettime.

Comments

H.J. Lu Jan. 22, 2015, 12:44 p.m. UTC | #1
On Thu, Jan 22, 2015 at 12:05 AM, Siddhesh Poyarekar
<siddhesh@redhat.com> wrote:
> Hi,
>
> We added vDSO support for time functions on i386 recently, but the
> __vdso_clock_gettime symbol was kept as an internal symbol.  This is
> fine for glibc as is, but it breaks Fedora builds since rtkaio now
> needs access to __vdso_clock_gettime.  I could maintain a patch in
> Fedora that exports this symbol as GLIBC_PRIVATE, but I reckon that it
> might be more consistent to put it upstream since all of the
> architectures that have vDSO time support export the symbol in
> GLIBC_PRIVATE already.
>
> Tested on i386 to verify that the build completes successfully.  OK to
> commit?
>

Can you explain why __clock_gettime isn't sufficient?
Siddhesh Poyarekar Jan. 22, 2015, 1:54 p.m. UTC | #2
On Thu, 22 Jan 2015 04:44:14 -0800
"H.J. Lu" <hjl.tools@gmail.com> wrote:
> Can you explain why __clock_gettime isn't sufficient?

rtkaio includes a separate definition for clock_gettime.  I guess I
should just patch through a redirect like clock_gettime in librt
instead of adding __vdso_clock_gettime.  I withdraw this patch.

Thanks,
Siddhesh
diff mbox

Patch

diff --git a/sysdeps/unix/sysv/linux/i386/Versions b/sysdeps/unix/sysv/linux/i386/Versions
index f3544ac..f18cbf3 100644
--- a/sysdeps/unix/sysv/linux/i386/Versions
+++ b/sysdeps/unix/sysv/linux/i386/Versions
@@ -47,5 +47,6 @@  libc {
   }
   GLIBC_PRIVATE {
     __modify_ldt;
+    __vdso_clock_gettime;
   }
 }