Date: Sat, 18 Aug 2012 12:07:34 -0400 (EDT) From: idunham@...abit.com To: musl@...ts.openwall.com Subject: Re: Building without -Wl,-Bsymbolic-functions > On Sat, Aug 18, 2012 at 01:38:23PM +0200, Jens wrote: >> >> Hi! >> >> Im building musl inside an oldish uclibc environment based on uclibc >> 0.9.30.1, gcc 4.1.2 and GNU ld version 2.17. >> >> The linker does not accept -Bsymbolic-functions. >> >> Im now building the shared library despite of this. >> >> How broken will the musl libc be without -Bsymbolic-functions ? > > If building without it entirely, the shared libc will just crash. > > If replacing it with -Bsymbolic, it will run, but global variables in > libc that are accessed by the application (e.g. environ, optind, ...) > will actually have separate copies in libc and the application, and > thus the app won't work as expected. Last I checked, ISTR it was "Illegal instruction" or segfault (even for hello world); I forget which was which, but both did not work at all. > A patch to add -Bsymbolic-functions to old binutils would be very > welcome... In the mean time, you could compile a new ld and pass the > -B option to gcc to give it the path for the new ld. The patch isn't trivial to get right, but 2.17.50 (20070703) is a significant improvement in many other ways (a few code generation fixes among them)... I've built a tarball, but not really posted it publicly (tarballs in git is really nasty 8-)* ). Interestingly, -B is not needed if you just put the desired version first in your path. (I found that out trying 2.17/2.17.50 on an Ubuntu host Isaac Dunham *see github.com/idunham/srcs if you still dare.
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.