From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8709 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: __write alias missing on arm platforms Date: Thu, 22 Oct 2015 16:55:25 -0400 Message-ID: <20151022205525.GZ8645@brightrain.aerifal.cx> References: <20151020031318.GA19600@brightrain.aerifal.cx> <56294562.4070303@dd-wrt.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1445547350 8401 80.91.229.3 (22 Oct 2015 20:55:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2015 20:55:50 +0000 (UTC) Cc: musl@lists.openwall.com To: Sebastian Gottschall Original-X-From: musl-return-8721-gllmg-musl=m.gmane.org@lists.openwall.com Thu Oct 22 22:55:50 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZpMtl-0004gB-PB for gllmg-musl@m.gmane.org; Thu, 22 Oct 2015 22:55:45 +0200 Original-Received: (qmail 18094 invoked by uid 550); 22 Oct 2015 20:55:44 -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 18070 invoked from network); 22 Oct 2015 20:55:43 -0000 Content-Disposition: inline In-Reply-To: <56294562.4070303@dd-wrt.com> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8709 Archived-At: On Thu, Oct 22, 2015 at 10:21:54PM +0200, Sebastian Gottschall wrote: > musl is missing the __write function which seem to be a alias to "write". > this is required by libgcc on arm platforms. under some conditions > the compiler will generate code which does reference > this function then which leads to unresolved symbols > (seen on squid 4.0.1 on xscale) > > /home/xfs/toolchains/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/bin/../lib64/gcc/armeb-openwrt-linux-muslgnueabi/5.2.0/libgcc.a(linux-atomic-64bit.o): > In function `__check_for_sync8_kernelhelper': > /home/xfs/openwrt/trunk2/trunk/build_dir/toolchain-armeb_xscale_gcc-5.2.0_musl-1.1.11/gcc-5.2.0/libgcc/config/arm/linux-atomic-64bit.c:59: > undefined reference to `__write' > collect2: error: ld returned 1 exit status > l __write is not a public API even in glibc as far as I can tell. This looks like an abuse of an accidentally-public symbol by libgcc. For musl target anyway it should just be patched out of libgcc, e.g. with #ifdef. Rich