mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: libc.so segfaults on mips
Date: Thu, 4 Sep 2014 14:32:09 +0200	[thread overview]
Message-ID: <20140904123208.GA10361@port70.net> (raw)
In-Reply-To: <7bb51525-1a3d-43e8-a567-7523ca3673c7@email.android.com>

* ???????? <lynx@sibserver.ru> [2014-09-04 16:56:40 +0800]:
> 4 ???????????????? 2014 ??. 15:35:45 KRAT, Rich Felker <dalias@libc.org> ??????????:
> >On Thu, Sep 04, 2014 at 03:07:57PM +0800, ???????? wrote:
> >> Not a really blocking bug but I was wondering why cross compiled
> >> musl libc.so for embedded wrt system is segfaults with this:

OpenWRT does not use standard mips ABI but its own thing:
you need mips-sf (softfloat) toolchain

> >> % ./strace ./libc.so 
> >> execve("./libc.so", ["./libc.so"], [/* 10 vars */]) = 0
> >> --- {si_signo=SIGSEGV, si_code=SI_USER, si_errno=EPERM, si_addr=0x4}
> >(Segmentation fault) ---
> >> +++ killed by SIGSEGV +++
> >> Segmentation fault
> >> 
> >> A strange segfault with EPERM.
> >> 
> >> The target is mips2 bigendian router, specifically it is ar9331 SoC.
> >> This is how file reports on libc.so: ELF 32-bit MSB shared object,
> >> MIPS, MIPS-I version 1 (SYSV), dynamically linked, not stripped

> >Could you attach the output of readelf -a libc.so? I'm guessing the
> The output of readelf attached.

i don't see the softfloat symbols of libgcc there
(eg __addsf3)

(musl malloc uses float arithmetics so ./libc.so will fail
immediately)

(openwrt kernel can be built with fpu emulation which is
the default on normal mips kernels)


  parent reply	other threads:[~2014-09-04 12:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  7:07 Рысь
     [not found] ` <20140904073545.GP12888@brightrain.aerifal.cx>
     [not found]   ` <7bb51525-1a3d-43e8-a567-7523ca3673c7@email.android.com>
2014-09-04 12:32     ` Szabolcs Nagy [this message]
2014-09-04 14:03       ` Рысь
2014-09-04 14:45         ` Szabolcs Nagy
2014-09-04 14:56           ` Рысь
2014-09-04 14:57     ` Rich Felker
2014-09-04 15:20       ` Рысь
2014-09-04 15:58         ` Rich Felker
2014-09-04 17:17           ` Rob Landley
2014-09-04 17:38             ` Laurent Bercot
2014-09-04 17:41               ` Rich Felker
2014-09-04 19:26                 ` Isaac Dunham
2014-09-04 19:48                 ` Rob Landley
2014-09-04 17:48             ` Рысь

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140904123208.GA10361@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).