Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 23 Aug 2012 08:24:15 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: build musl with clang

On Thu, Aug 23, 2012 at 01:53:18PM +0600, agent wrote:
> i am trying to build musl with clang 3.0 from ubuntu 12.04. musl
> itself builds fairly fine with some notes on unused command line
> parameters and coding style. but i have some issues compiling a
> simple hello world program against this musl. the code is:
> 
> #include <stdio.h>
> 
> int main(int argc, char **argv) {
>     printf("Hello, World!\n");
>     return 0;
> }
> 
> i have tried to link against musl both dynamically and statically.
> if i compile a program with the default ld-linux.so dynamic linker
> the program runs but fails at the end:

This usage is not intended to work. At present it might be possible to
make it work for programs that don't use dlopen or TLS (which isn't
supported yet anyway), but in the long term I think using the GNU
dynamic linker is going to get more and more unrealistic, so it's
probably best not to even try.

> (gdb) r
> Starting program: /home/agent/dev/musl/musl-0.9.4_clang/lib/t.out
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7f9d73a in find_sym () from /lib/ld-musl-i386.so.1
> (gdb) where
> #0  0xb7f9d73a in find_sym () from /lib/ld-musl-i386.so.1

Did you change the options musl was compiled/linked with? Naively, my
first guess is that -Bsymbolic-functions was omitted.

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.