Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190605183742.GK1506@brightrain.aerifal.cx>
Date: Wed, 5 Jun 2019 14:37:42 -0400
From: Rich Felker <dalias@...c.org>
To: "tenspd137 ." <dcday137@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: Illegal instruction in __copy_tls()

On Wed, Jun 05, 2019 at 12:16:39PM -0600, tenspd137 . wrote:
> Hi all
> 
> I am using musl 1.1.22 with in a cross toolchain to create static
> binaries on my machine.  I am running gentoo linux and used their
> crossdev tool to create the cross compiler (x86_64-pc-linux-musl).  I
> created a small hello world app:
> 
> #include <stdio.h>
> int main(int argc, char **argv)
> {printf("Hello MUSL\n");}
> 
> and compiled with:
> 
> x86_64-pc-linux-musl-gcc -v -static -Os -g hello.c
> 
> Built and runs fine on local machine, but when I put the binary on
> another machine, it dumped the core with an ilegal instruction.  gdb
> claims illegal instruction in __copy_tls().
> 
> I have been able to compile this program after building the musl-gcc
> wrapper and it works on both machines, but I need the cross toolchain
> for C++ support.  The -v in the commandline above prints messages that
> indicate it is using musl from what I can tell.
> 
> Can anyone point me in the right direction or help me figure out what
> I am missing?

Can you show the gdb backtrace, disassembly at the point of crash, and
an strace leading up to it?

My best guess is that your toolchain is producing binaries for some
non-baseline level of x86_64 ISA, and the machine you're trying to run
it on does not support some of the instructions used.

Rich

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.