Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 4 Sep 2014 14:32:09 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: libc.so segfaults on mips

* ???????? <lynx@...server.ru> [2014-09-04 16:56:40 +0800]:
> 4 ???????????????? 2014 ??. 15:35:45 KRAT, Rich Felker <dalias@...c.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)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.