From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14604 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Markus Wichmann Newsgroups: gmane.linux.lib.musl.general Subject: About those weak aliases Date: Mon, 2 Sep 2019 21:04:48 +0200 Message-ID: <20190902190359.GA6472@voyager> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="224587"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.9.4 (2018-02-28) To: musl@lists.openwall.com Original-X-From: musl-return-14620-gllmg-musl=m.gmane.org@lists.openwall.com Mon Sep 02 21:05:05 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1i4rdR-000wI4-0n for gllmg-musl@m.gmane.org; Mon, 02 Sep 2019 21:05:05 +0200 Original-Received: (qmail 17554 invoked by uid 550); 2 Sep 2019 19:05:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17522 invoked from network); 2 Sep 2019 19:05:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1567451088; bh=wTgnjl5/p3ulMGmkCENH2ayanYlkLzErJsl2eDoMhI8=; h=X-UI-Sender-Class:Date:From:To:Subject; b=gQP7q7ePiWB/yqYGFhzRBV8qxDHb7UaruC76Th7EEAhdRNDxUMc7UTudrwNaudxb8 Kt6OyYmGu9NdJeM/+JokKo1npUbBZw9QA5OAKDR95blf5GiYTM4yWge4YXL+rhS6aC y4Ohh+x5nwanBWsW3Tt13Txo2C/i5rJHmKGAlcZs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-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EUGmNJhAKyZRefbmLK2Zg8jRPtFoJhFCBfBn/5j6L+xuczByxR8D//hX Xref: news.gmane.org gmane.linux.lib.musl.general:14604 Archived-At: Hi all, I'd like to know what those weak aliases are for in the many cases where they are used to define a public interface. Or, more to the point, by what criteria they are handed out, and by what logic the internal symbols are used. For instance, pthread_mutex_lock() et al. are weakly defined, but pthread_cond_wait() is not. Unlike pthread_cond_timedwait(), which is called from pthread_cond_wait() by the public symbol that might be interposed. Makes sense, since pthread_cond_wait() does not depend on mutex internals (pthread_cond_timedwait() does). I found no C standard function with a weak definition. But I did find crypt() being strongly defined, but it calls the internal (strong) definition of crypt_r(), rather than the weak one. So I thought maybe the C standard functions get strong definitions and all others get weak ones. But open(), close(), etc. are also defined strongly, while fdopen() gets a weak definition. And those are all in POSIX. Meanwhile, adjtime() gets a strong definition, as does getdents(), and those are Linux specialities. So yeah,I have so far failed to identify any rhyme or reason to these definitions. Can anyone help me? Ciao, Markus