From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14613 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Markus Wichmann Newsgroups: gmane.linux.lib.musl.general Subject: Re: About those weak aliases Date: Thu, 5 Sep 2019 19:29:04 +0200 Message-ID: <20190905172904.GB9317@voyager> References: <20190902190359.GA6472@voyager> <20190902201009.GV22009@port70.net> <20190905165008.GA9317@voyager> <20190905165822.GA22009@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="199379"; 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-14629-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 05 19:29:22 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 1i5vZP-000plV-T8 for gllmg-musl@m.gmane.org; Thu, 05 Sep 2019 19:29:19 +0200 Original-Received: (qmail 21936 invoked by uid 550); 5 Sep 2019 17:29:17 -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 21913 invoked from network); 5 Sep 2019 17:29:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1567704545; bh=nE7RBWQb3VAUq0A/It6EpDYqJLHUjgscz4RkKojsZ+Q=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=ZdO3yuV1hJiKbRZ641HB8qdU7d5ek63grH7nkpuxhCIwZWnl3V2YnHnzS//2Sshst alKoisWja513q24+5avvf5hL5ndtlzU/IevdL3KlkQJlnuIXyJ6yH5A8RrnbVjs1Zm ff/EjhimOvxYofv3w2+oAn2hue69oMY0CLPl+Tdc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Content-Disposition: inline In-Reply-To: <20190905165822.GA22009@port70.net> X-Provags-ID: V03:K1:/J4c2FSGQvjlPtGvvxYvgyZ5kfdbztVw98/9IVGLFJOiAr1nXCC qcMZfeO/GKQy/MjNSJxxGCnbEzj5MbiRcVUNmCDEK6JPohWgtupEycmSzcPGP511Z84zZTd HGDGxvciYxEH1P0tquwsR/mH9j8xI6nzh4wExpNH/C2FUemxCBXxjAe7aPC4cEydJ0lK9LR rvuQoh7r1YMmlkf7OuIqQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:Df/wYMYaw2c=:0ff+/fEmFQwgmWglFJfEcm HxH4IUPhIS8Y0aJl1LVU+UPC737vb3qnuyLMxfgC84hFF99k6XI0tvgdg+XP5Km7DEp4wuVvT R2wjBJNhV6N5/9Igtni/q7fHQ8pyZnr08hEzXKbr/K2Ot77E2e8rGwVmzAQ6IFz517UTOHPY5 z0WMcQHkeFZJUGFvGr/TnVpiaKTN4xbEdpHJkd/3FErjk9JELoy1Mi4QGidlGtBCD4nNxOtz0 54nDRtjg165Fhy22D6AxcUK6NJcBQcPUN5dDJOhbr99RV99q5fkVOCpIpMKCHKbPwclDcm7fy 8EzvUOnQaPO25Or37cst1zKxqEqUmve3h7/IXAspUfGUCOk9HYrbPIwKPXx97GvKCZWztNIK3 +Ko4Rm7aZY46fZvqF38v74NqB0sCFcqS3qAzHw8oE0qqo8uBryi/CGeg8sYEONC8fV0BpxtGL ssAOZzvCEG0aRPwgERoQD8ydn2Yj6Cs5UCyiPyOsM6g6gKLgQxbgfLWLaiA9j3pEsLBYXNpN9 zEyid/a0NGVXICzXfknOW+x8h1GcAr4t8foc0n0VcKJeJ5ZpNFU4n7QkKaHATpmSoT25lIj02 +OdGHGqIt+iQmBPD5IjvyOgJiHcBOxV1ADEn4LK49vNGvd9Hcic4aYsBnVOZc1d9+Phjn9Ymo BihH6GXD/0PCOjcZZ/ZBBqAgnKx29c/OZX71dfSXwNKLHanTbU/FgtPYGW0iPwLd6uLI8vmWk WITlRERiv1jkagyWAHck6m6LM5KxdFiZEJxE4B46hgiV0vAvVS8pi0c8pWt3v/XS9eLZBOuR Xref: news.gmane.org gmane.linux.lib.musl.general:14613 Archived-At: On Thu, Sep 05, 2019 at 06:58:22PM +0200, Szabolcs Nagy wrote: > can you show an example use of open in musl code > where it is called form an api implementation > that is defined by iso c? > No, I can't. And I think I understand now. musl is trying to prevent linker errors from namespace pollution. More specifically, to prevent double definition errors. Such an error would happen during static linking, if a strong symbol from an unrelated standard were pulled in. To that end, weak aliases are handed out on an as-needed basis. open() is not needed to implement any interface from a standard it is not a part of (fopen() inlines the syscall), so it gets no alias. mmap() is needed to implement malloc(), so it gets one. Repeat for all other functions. How close am I? Ciao, Markus