From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1630 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Building without -Wl,-Bsymbolic-functions Date: Sat, 18 Aug 2012 08:14:18 -0400 Message-ID: <20120818121418.GX27715@brightrain.aerifal.cx> References: 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: ger.gmane.org 1345291988 11687 80.91.229.3 (18 Aug 2012 12:13:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Aug 2012 12:13:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1631-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 18 14:13:07 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 1T2htq-0006AM-6F for gllmg-musl@plane.gmane.org; Sat, 18 Aug 2012 14:13:06 +0200 Original-Received: (qmail 22023 invoked by uid 550); 18 Aug 2012 12:13:04 -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 22013 invoked from network); 18 Aug 2012 12:13:04 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1630 Archived-At: 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. 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. Rich