Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934900AbaFTPzq (ORCPT ); Fri, 20 Jun 2014 11:55:46 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:33450 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756679AbaFTPzX (ORCPT ); Fri, 20 Jun 2014 11:55:23 -0400 MIME-Version: 1.0 In-Reply-To: <20140616154228.GB179@brightrain.aerifal.cx> References: <21405.44257.742122.786960@gargle.gargle.HOWL> <20140615143500.GP179@brightrain.aerifal.cx> <539DD26B.3060709@zytor.com> <539DDE9C.3010903@zytor.com> <20140616023604.GI5714@two.firstfloor.org> <20140616143801.GJ5714@two.firstfloor.org> <20140616154228.GB179@brightrain.aerifal.cx> From: Andy Lutomirski Date: Fri, 20 Jun 2014 08:55:01 -0700 Message-ID: Subject: Re: [RFC 0/2] __vdso_findsym To: Rich Felker Cc: Ian Lance Taylor , Andi Kleen , "H. Peter Anvin" , Mikael Pettersson , Russ Cox , Linux API , "linux-kernel@vger.kernel.org" , X86 ML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 16, 2014 at 8:42 AM, Rich Felker wrote: > On Mon, Jun 16, 2014 at 08:31:39AM -0700, Ian Lance Taylor wrote: >> On Mon, Jun 16, 2014 at 7:38 AM, Andi Kleen wrote: >> >> I think this issue started when some of the Go developers questioned >> >> why the kernel needed to provide a very complex interface--parsing an >> >> ELF shared shared library--for very simple functionality--looking up >> >> the address of a magic function. This approach has required special >> >> support not just in Go, but also in the dynamic linker and gdb, and >> >> does not work well for statically linked binaries. The support in gdb >> >> is perhaps a good idea, but elsewhere it does not make sense. >> >> >> >> So why not provide a simple interface? >> > >> > What good would it do now that everyone already supports it? >> >> Do statically linked binaries use the vDSO calls? > > Under glibc, I believe so (not checked). Under musl, yes, and even in > the dynamic-linked case we use the same code that's used for static > linking rather than trying to get the dynamic linker to do them > correctly. I still have some cruft lying around from where (in the > past) we tried to do it via the dynamic linker, but I'm probably going > to remove that and make the vdso behave as RTLD_LOCAL so that there's > no risk of weird symbols it exports interfering with the application > (applications could still make it global via an explicit dlopen). The > only reason for keeping it around at all in the dynamic linker is for > the sake of gdb. > What about backtrace_symbols, dl_addr, and the unwinder (e.g. siglongjmp)? It would be nice to wean the vdso off of frame pointers some day. --Andy -- 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/