From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5082 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Linking musl with ld.gold Date: Wed, 7 May 2014 21:06:05 -0400 Message-ID: <20140508010605.GE26358@brightrain.aerifal.cx> References: <20140506101410.GP12324@port70.net> <20140506231807.GQ12324@port70.net> <20140507130443.72c74f47@vostro> 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 1399511188 24193 80.91.229.3 (8 May 2014 01:06:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 May 2014 01:06:28 +0000 (UTC) Cc: scjthm@live.com To: musl@lists.openwall.com Original-X-From: musl-return-5088-gllmg-musl=m.gmane.org@lists.openwall.com Thu May 08 03:06:21 2014 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 1WiCmw-0001GZ-Uh for gllmg-musl@plane.gmane.org; Thu, 08 May 2014 03:06:19 +0200 Original-Received: (qmail 11859 invoked by uid 550); 8 May 2014 01:06:17 -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 11851 invoked from network); 8 May 2014 01:06:17 -0000 Content-Disposition: inline In-Reply-To: <20140507130443.72c74f47@vostro> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5082 Archived-At: On Wed, May 07, 2014 at 01:04:43PM +0300, Timo Teras wrote: > On Wed, 7 May 2014 10:04:24 +0100 > Stephen Thomas wrote: > > > > only the object files with referenced symbols are linked from an > > > archive > > > > > > so only a.o with the given main.o because of the symbol f > > > > > > now if you make some reference in main.c such that b.o should > > > be included but main still returns 0 that would be a bug > > > > > > eg. add a void g(void){} to b.c and call it from main.c > > > > Ok, thanks for that info. It appears that there is a problem in gcc > > 4.9 and not 4.8.3. > > Is perhaps -ffunction-sections and/or -fdata-sections added > automatically? Those would break musl like experienced. They should not break musl; if they do, it's a compiler bug. The strong symbol that overrides the weak symbol elsewhere is not unused and available for garbage collection because it's referenced. I suspect your claim is just wrong, since IIRC people have successfully used these options with musl. Rich