Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752181AbaFOT5b (ORCPT ); Sun, 15 Jun 2014 15:57:31 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41782 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbaFOT52 (ORCPT ); Sun, 15 Jun 2014 15:57:28 -0400 User-Agent: K-9 Mail for Android In-Reply-To: References: <21405.44257.742122.786960@gargle.gargle.HOWL> <20140615143500.GP179@brightrain.aerifal.cx> <539DD26B.3060709@zytor.com> <539DDE9C.3010903@zytor.com> <4ab91a07-c46c-485b-895d-b074d36624d6@email.android.com> <90c597c5-f77d-491e-b0b8-dde2027155b5@email.android.com> <9a4fb9c9-4b1c-4593-a99e-a2ef2325d55d@email.android.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [RFC 0/2] __vdso_findsym From: "H. Peter Anvin" Date: Sun, 15 Jun 2014 12:56:39 -0700 To: Ian Lance Taylor CC: Andy Lutomirski , Andi Kleen , Rich Felker , Mikael Pettersson , Russ Cox , Linux API , "linux-kernel@vger.kernel.org" , X86 ML Message-ID: <8607961d-b42a-4dba-a736-d3a8586ee42d@email.android.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org You can link against vdso.so if you want to; the kernel build provides an option to install that image. Doesn't mean that any particular libc uses it. On June 15, 2014 12:50:36 PM PDT, Ian Lance Taylor wrote: >On Sun, Jun 15, 2014 at 12:31 PM, H. Peter Anvin wrote: >> The weak symbols are well-known names. The __vdso symbols are >strong. > >I see. But I don't understand how this is supposed to work. When I >link a program against gettimeofday, I get a reference to gettimeofday >with version GLIBC_2.2.5. After all, I only link against libc.so; I >don't link against the vDSO. The VDSO provides gettimeofday with >version LINUX_2.6. Since those versions don't match, the gettimeofday >reference in my executable will not be satisfied by the definition in >the vDSO. So at dynamic link time my program is always going to be >linked with the gettimeofday in libc.so, which will in turn call the >gettimeofday in the vDSO. > >Am I missing something that makes the definition of gettimeofday with >version LINUX_2.6 in the vDSO useful? > >Ian > > > >> On June 15, 2014 12:22:17 PM PDT, Ian Lance Taylor >wrote: >>>On Sun, Jun 15, 2014 at 12:14 PM, H. Peter Anvin >wrote: >>>> >>>> If it doesn't, then you incur an additional indirection penalty. >The >>>strong __vdso symbol allows the libc wrapper to fall back to the vdso >>>implementation, the weak symbol allows three to be no wrapper at all. >>>This is good. >>>> >>>> The reason for changing ABI would be shifting types. This is very >>>much how glibc manages transitions. >>> >>>The purpose of symbol versioning is so that symbols with well known >>>names, like stat, can continue to use those same names while changing >>>types. Both old and new programs can continue to use the name stat >>>and continue to work even though they use different types. >>> >>>I don't see how this applies to the kernel VDSO. Those symbols do >not >>>use well-known names; they use names like __vdso_time. If you change >>>the types used by those symbols, you can change the name as well. >>>What is the downside? >>> >>>Ian >> >> -- >> Sent from my mobile phone. Please pardon brevity and lack of >formatting. -- Sent from my mobile phone. Please pardon brevity and lack of formatting. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/