From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2332 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general,gmane.comp.embedded.openwrt.devel Subject: Re: Support for musl libc in OpenWrt Date: Sat, 24 Nov 2012 11:01:50 +0100 Message-ID: <20121124100150.GB10895@port70.net> References: <50AFD839.9010408@openwrt.org> <20121123221533.eb6d941c.idunham@lavabit.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 1353751328 3195 80.91.229.3 (24 Nov 2012 10:02:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Nov 2012 10:02:08 +0000 (UTC) Cc: Florian Fainelli , openwrt-devel@lists.openwrt.org To: musl@lists.openwall.com Original-X-From: musl-return-2333-gllmg-musl=m.gmane.org@lists.openwall.com Sat Nov 24 11:02:19 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TcCYx-0005OQ-E6 for gllmg-musl@plane.gmane.org; Sat, 24 Nov 2012 11:02:15 +0100 Original-Received: (qmail 15775 invoked by uid 550); 24 Nov 2012 10:02:03 -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 15767 invoked from network); 24 Nov 2012 10:02:03 -0000 Content-Disposition: inline In-Reply-To: <20121123221533.eb6d941c.idunham@lavabit.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2332 gmane.comp.embedded.openwrt.devel:16405 Archived-At: * Isaac Dunham [2012-11-23 22:15:33 -0800]: > On Fri, 23 Nov 2012 21:10:33 +0100 > Florian Fainelli wrote: > > MIPS and MIPSel specific issues: > > > > using qemu's binary emulation (qemu-mips[el]) against a statically > > linked binary works, a dynamic binary makes my host qemu segv. Using > > qemu-system-mips[el], the binary segfaults while being executed by the > > kernel. So far I have not had the time to debug this further. > > There are likely other issues, but are you using a hardfloat-compatible kernel (FPU emulation enabled)? > At present, musl/mips relies on certain instructions that the kernel ordinarily emulates when they aren't supported. > the fpu issue should not cause segfault, iirc it infinite loops at the fp instruction it's a dynamic linking related issue i've already ran cross compiled, dynlinked mips binaries on an openwrt router using musl based toolchain[1] (although that was about a month ago) i would guess it's some build issue (wrong thing gets linked, or -fPIC fails,..) or something in the runtime environment is different from what musl expects maybe try to run the loader in 'ldd' mode: musl's libc.so is the loader itself and can be invoked as pathto/libc.so executable which runs the dynlinked executable (so the musl dynamic loader can be straced) or ln -s pathto/libc.so pathto/ldd pathto/ldd executable which prints the opened dso paths during loading and then quits [1] https://bitbucket.org/GregorR/musl-cross/downloads