Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.10.1308131112290.7612@laas.mine.nu>
Date: Tue, 13 Aug 2013 12:39:52 +0200 (CEST)
From: Jens <jensl@...s.mine.nu>
To: musl@...ts.openwall.com
Subject: problems with dynamic linking since 0.9.1


Hello!

Dynamic linking with musl has stopped working for me since musl 0.9.1.
I havent tested all versions but 0.9.6 and 0.9.12 does not work.

Im still using that strange uclibc environment where gcc is itself a 
wrapper that calls rawgcc.

Info for 0.9.1 and 0.9.12 below.

Any ideas or pointers welcome.

Regards,
Jens

0.9.1 (working):
bash-4.1# musl-gcc -v t.o
Using built-in specs.
Reading specs from /opt/musl/lib/musl-gcc.specs
rename spec cpp_options to old_cpp_options
rename spec link to old_link
Target: x86_64-unknown-linux
Configured with: 
/home/landley/firmware-0.9.6/build/temp-x86_64/gcc-core/configure 
--prefix=/home/landley/firmware-0.9.6/build/mini-native-x86_64/usr 
--disable-multilib --build=x86_64-walrus-linux --host=x86_64-unknown-linux 
--target=x86_64-unknown-linux --enable-long-long --enable-c99 
--enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-nls 
--enable-languages=c,c++ --disable-libstdcxx-pch --enable-sjlj-exceptions 
--program-prefix=
Thread model: posix
gcc version 4.1.2
  /usr/bin/../libexec/gcc/x86_64-unknown-linux/4.1.2/collect2 
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 
-dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib /opt/musl/lib/crt1.o 
/opt/musl/lib/crti.o /usr/gcc/lib/crtbegin.o -L/opt/musl/lib t.o 
/usr/gcc/lib/libgcc.a /usr/gcc/lib/libgcc_eh.a -lc /usr/gcc/lib/libgcc.a 
/usr/gcc/lib/libgcc_eh.a /usr/gcc/lib/crtend.o /opt/musl/lib/crtn.o

# cat /opt/musl/lib/musl-gcc.specs
%rename cpp_options old_cpp_options

*cpp_options:
-nostdinc -isystem /opt/musl/include %(old_cpp_options)

*cc1:
%(cc1_cpu) -nostdinc -isystem /opt/musl/include

*link_libgcc:
-L/opt/musl/lib

*libgcc:
/usr/gcc/lib/libgcc.a%s %:if-exists(/usr/gcc/lib/libgcc_eh.a%s)

*startfile:
%{!shared: /opt/musl/lib/%{pie:S}crt1.o} /opt/musl/lib/crti.o 
%{shared|pie:crtbeginS.o%s;:/usr/gcc/lib/crtbegin.o%s}

*endfile:
%{shared|pie:crtendS.o%s;:/usr/gcc/lib/crtend.o%s} /opt/musl/lib/crtn.o

%rename link old_link

*link:
%(old_link) -dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib

*esp_link:


*esp_options:


*esp_cpp_options:

0.9.12 (non working):
bash-4.1# musl-gcc -v t.o
Using built-in specs.
Reading specs from /opt/musl/lib/musl-gcc.specs
rename spec cpp_options to old_cpp_options
Target: x86_64-unknown-linux
Configured with: 
/home/landley/firmware-0.9.6/build/temp-x86_64/gcc-core/configure 
--prefix=/home/landley/firmware-0.9.6/build/mini-native-x86_64/usr 
--disable-multilib --build=x86_64-walrus-linux --host=x86_64-unknown-linux 
--target=x86_64-unknown-linux --enable-long-long --enable-c99 
--enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-nls 
--enable-languages=c,c++ --disable-libstdcxx-pch --enable-sjlj-exceptions 
--program-prefix=
Thread model: posix
gcc version 4.1.2
  /usr/bin/../libexec/gcc/x86_64-unknown-linux/4.1.2/collect2 
-dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib /opt/musl/lib/crt1.o 
/opt/musl/lib/crti.o /usr/gcc/lib/crtbegin.o -L/opt/musl/lib -L /lib/. t.o 
/usr/gcc/lib/libgcc.a /usr/gcc/lib/libgcc_eh.a -lc /usr/gcc/lib/libgcc.a 
/usr/gcc/lib/libgcc_eh.a /usr/gcc/lib/crtend.o /opt/musl/lib/crtn.o
/opt/musl/lib/libc.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

# cat /opt/musl/lib/musl-gcc.specs
%rename cpp_options old_cpp_options

*cpp_options:
-nostdinc -isystem /opt/musl/include -isystem include%s %(old_cpp_options)

*cc1:
%(cc1_cpu) -nostdinc -isystem /opt/musl/include -isystem include%s

*link_libgcc:
-L/opt/musl/lib -L .%s

*libgcc:
/usr/gcc/lib/libgcc.a%s %:if-exists(/usr/gcc/lib/libgcc_eh.a%s)

*startfile:
%{!shared: /opt/musl/lib/%{pie:S}crt1.o} /opt/musl/lib/crti.o 
%{shared|pie:crtbeginS.o%s;:/usr/gcc/lib/crtbegin.o%s}

*endfile:
%{shared|pie:crtendS.o%s;:/usr/gcc/lib/crtend.o%s} /opt/musl/lib/crtn.o

*link:
-dynamic-linker /lib/ld-musl-x86_64.so.1 -nostdlib %{shared:-shared} 
%{static:-static} %{rdynamic:-export-dynamic}

*esp_link:


*esp_options:


*esp_cpp_options:


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.