|
Message-ID: <20190301142107.GH23599@brightrain.aerifal.cx> Date: Fri, 1 Mar 2019 09:21:07 -0500 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Re: Segmentation fault on statically linked programs On Fri, Mar 01, 2019 at 07:23:50AM -0500, James Larrowe wrote: > Program received signal SIGSEGV, Segmentation fault. > 0x00000000004018e6 in static_init_tls (aux=0x7fffffffdda0) at > src/env/__init_tls.c:90 > 90 if (phdr->p_type == PT_PHDR) You have a buggy version of binutils that produces invalid binaries when static linking small programs. Either downgrade or apply the patches from here: https://git.alpinelinux.org/aports/tree/main/binutils?id=52c531d4b9b061dfced2844b15df5c5e3d2a1b43 Rich > On Fri, Mar 1, 2019 at 7:23 AM James Larrowe <larrowe.semaj11@...il.com> > wrote: > > > This is the output of GDB when musl and the program itself are built with > > -gdwarf-4 -g3 -fno-omit-frame-pointer: > > > > > > On Fri, Mar 1, 2019 at 7:08 AM James Larrowe <larrowe.semaj11@...il.com> > > wrote: > > > >> Any statically linked musl program gives a segmentation fault when run. > >> > >> Output of GDB debugger: > >> > >> Starting program: /home/chronos/user/Downloads/tarballs/busybox-1.30.1/test > >> > >> Program received signal SIGSEGV, Segmentation fault. > >> 0x0000000000401566 in __init_tls () > >> (gdb) bt > >> #0 0x0000000000401566 in __init_tls () > >> #1 0x0000000000000000 in ?? () > >> > >> > >> Minimal example: > >> > >> int main(void) { return 0; } > >> > >> > >> Please CC me, I'm not subscribed to the list. > >> > >>
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.