From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13586 Path: news.gmane.org!.POSTED!not-for-mail From: Markus Wichmann Newsgroups: gmane.linux.lib.musl.general Subject: Re: pthread_key_create bug? Date: Tue, 8 Jan 2019 23:10:06 +0100 Message-ID: <20190108221006.GF29911@voyager> References: <84B22C11-AA93-47FD-8352-A4F18B19F689@gmail.com> <5c1d9cf6-1b53-7082-5dee-8673ed4c55e9@adelielinux.org> <20190107021128.GW23599@brightrain.aerifal.cx> <20190107171327.GD29911@voyager> <20190108000018.GZ23599@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1546985326 24376 195.159.176.226 (8 Jan 2019 22:08:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2019 22:08:46 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-13602-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 08 23:08:42 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.84_2) (envelope-from ) id 1ggzYA-0006Eu-0K for gllmg-musl@m.gmane.org; Tue, 08 Jan 2019 23:08:42 +0100 Original-Received: (qmail 27859 invoked by uid 550); 8 Jan 2019 22:10:51 -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 27840 invoked from network); 8 Jan 2019 22:10:50 -0000 Content-Disposition: inline In-Reply-To: <20190108000018.GZ23599@brightrain.aerifal.cx> X-Provags-ID: V03:K1:5xJwgICh6ryOUMmADOBHbowcjXobaVvWawkPZmW4km51gX+CKe5 R9LQY+cWZ01hiGUUsJNYsLfFz6LligFkyBE7s2OSSHYQsVtDRVVRUqI9ltZzFIl+HF0mu1K op0jAvcUAztfVJKw2KaOkBccQeGfB2Sg6hn+hNsB0rdTFfPFbe2XXOFIPhBAB1W0QfNFalE kRvDv1Rka9kS8tpM0sT7g== X-UI-Out-Filterresults: notjunk:1;V03:K0:Y9TRiEKneIE=:13ZwCs1VKWhFNY0m4r+u3s lnlVUjnV6vzOUG7O9+IXXROTfxi79y2GbaBy5Zcgirr++k3wb85udIJkwd6KR6N2IESYyYTfY 77Ugpn1HKhykuHm4uwaOAZbQmTgrsn/rwiuJubu8EGRGcHyZfFYcfDt4oSKXGNlWSTK9CKuv0 1ZhYDcZaq/PXipCIDR2L3yCuascrsh1hhwh2Gukj08av9bYE6lc5VFS+gxZGMb2QBbahY/fOJ 5Bnyvjw4Xe/8cJA2HUBN79PM/m6nk3qBCPUgr3JnMQu6ggoyXI75cfLaOexM7AUNH9K5VBWdI SISmRJfzxP+NhsFULhzrDoaItg1raFwX3VaBgGW3J+l06VXrEbEnz6tMqBd/xWEeF0bE0pwhK +sHOhwJMCwB6NDk/ohRqaZeMXlOJQ+tZaTJ3neKau9hPmx8T4vrgTBOXI6vPpU7C/CubWG/a+ SyRuP2epY1jH38xjsXHjGPMdodAkVBR/0FN22tOLopiqosv9pWSy0xQddUwnlkxFcJcSipdb1 3Bd29LfXwFDF4PTRpqO7BTvgxPqpaACrOE7ZMk2/rvrOmLrYgbGoocMlbitZUmzNeK051CTw8 TOit0z4EStrZfPQs78azbq9NhEF6HGW1yfAZsUeEmzZbtEFslU5lSqgYTAEKWYYFBQN7IqjwN K8cq2EC3Nj0nsXoKYEpImPxiPjXFvyjLOuZ1088/Fy1Nx4XohZaufTsrOZE4aVaxOhEm0e4WG suaKbbNQQ/tu/KMOmqZitqxe/HCUQ+mNjnTPM/5XpXisDDBLe9FSRqlDF/bS4Nw2gbUDh3I+ Xref: news.gmane.org gmane.linux.lib.musl.general:13586 Archived-At: On Mon, Jan 07, 2019 at 07:00:18PM -0500, Rich Felker wrote: > I think you're right, though we don't generally use weak references in > musl on the basis (perhaps somewhat dubious) that they're an > additional toolchain feature that might cause problems reusing the > code in non-ELF contexts (this may affect midipix; I'm not sure). > That's why weak aliases to dummy functions are used for this purpose > everywhere else. > I don't quite get you. Weak aliases are just weak references with a non-zero default value. Any toolchain being able to handle weak aliases should be able to handle weak references, right? And if a port had to fudge things to get weak aliases to work, they could just continue to fudge things to make weak references into strong ones. This is merely an optimization; not having the weak reference doesn't break anything, just increases the binary size. > Also: weak references to hidden functions historically had some > breakage with respect to generating unresolvable-at-ld-time > pc-relative references to the symbol. Thus their use might break some > gcc/binutils versions too. > > Rich OK, that's interesting. But do we really want to work around bugs in gcc/binutils? Especially ones that were fixed a while ago? Because that might lead us to a situation where we have ugly code we can't improve because an old version of binutils had a bug, which is a fact that will never go away, so the code stays ugly forever. Not saying this is that situation, of course. Ciao, Markus