From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/357 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Compilation error Date: Sun, 7 Aug 2011 18:05:09 -0400 Message-ID: <20110807220509.GM132@brightrain.aerifal.cx> References: <6b8e6a08f65ec476283a3699a41451d7@smtp1.ispfr.net> <20110807193658.GA29562@port70.net> <20110807193431.GI132@brightrain.aerifal.cx> <20110807195006.GJ132@brightrain.aerifal.cx> <20110807220940.GC29562@port70.net> <20110807220025.GL132@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1312755471 19131 80.91.229.12 (7 Aug 2011 22:17:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 7 Aug 2011 22:17:51 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-358-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 08 00:17:47 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QqBfF-0007WB-Tt for gllmg-musl@lo.gmane.org; Mon, 08 Aug 2011 00:17:46 +0200 Original-Received: (qmail 24547 invoked by uid 550); 7 Aug 2011 22:17:45 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24539 invoked from network); 7 Aug 2011 22:17:45 -0000 Content-Disposition: inline In-Reply-To: <20110807220025.GL132@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:357 Archived-At: On Sun, Aug 07, 2011 at 06:00:25PM -0400, Rich Felker wrote: > > isn't it enough to > > weakalias(sc_clock_gettime, __vdso_clock_gettime); > > and then just use __vdso_clock_gettime ? > > > > (so no __cgt etc) > > No, because -Bsymbolic-functions binds it at link-time, or in other > words, libc.so is intentionally built with no PLT because that makes > it faster to start, faster to run, and lighter in memory. By the way, it would be a lot nicer if we could use and rely on visibility instead of -Bsymbolic-functions, so we could override the behavior for a few specific functions. However, as far as I can tell gcc (much less any other compiler) has no way to say "all functions without explicit visibility should be protected, and all data without explicit visibility should be default". So to use visibility we'd have to have hideous attributes all over the place, which is pretty much unacceptable... Fortunately -Bsymbolic-functions is a close enough approximation to what we want, and happens at the linker level instead of the compiler level, so it's safe to use. Rich