From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/938 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: SIGILL when dynamic linking without -Wl,-Bsymbolic-functions Date: Mon, 28 May 2012 09:10:19 -0400 Message-ID: <20120528131019.GG163@brightrain.aerifal.cx> References: <20120527215256.508af780@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1338210924 25998 80.91.229.3 (28 May 2012 13:15:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 May 2012 13:15:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-939-gllmg-musl=m.gmane.org@lists.openwall.com Mon May 28 15:15:22 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SYzn8-0001NN-BG for gllmg-musl@plane.gmane.org; Mon, 28 May 2012 15:15:22 +0200 Original-Received: (qmail 12270 invoked by uid 550); 28 May 2012 13:15:22 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 12262 invoked from network); 28 May 2012 13:15:22 -0000 Content-Disposition: inline In-Reply-To: <20120527215256.508af780@newbook> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:938 Archived-At: On Sun, May 27, 2012 at 09:52:56PM -0700, Isaac Dunham wrote: > When -Wl,-Bsymbolic-functions is disabled in the makefile, musl > cannot be used for dynamic linking. > However, the -Bsymbolic-functions option was added in binutils 2.17.50 > (a CVS/git version, not a release); this was apparently just prior to > the license switch. > > As a result, it will be impossible to use Aboriginal Linux packages to > generate a version capable of dynamic linking. > > I'm pretty sure this used to work...but I don't remember when I tested > it last. I think it was somewhere around 0.8.1-0.8.5. It's always been this way. In principle -fvisibility=protected should be able to do the same thing on earlier GCC's, but it doesn't work right. You could also try -fPIE instead of -fPIC; that might work. As a last resort, -Bsymbolic will work, but it will do too much and will break any applications that access global vars in libc (like optarg, environ, etc.). I thought Rob said he was going to patch -Bsymbolic-functions into his binutils, but I guess he never did... Rich