From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/514 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] properly terminate linked link of dsos Date: Fri, 14 Oct 2011 18:53:34 -0400 Message-ID: <20111014225334.GZ132@brightrain.aerifal.cx> References: <1318427173.165420.11829@legion> <20111012140141.GX132@brightrain.aerifal.cx> <37ae4188867ea36022c6305ae687bd23@exys.org> <05e2d053cdb7c8726eb0f9bcebbbf048@exys.org> <20111014010317.GY132@brightrain.aerifal.cx> <20111014141152.0cb08bee@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1318633332 30225 80.91.229.12 (14 Oct 2011 23:02:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2011 23:02:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-515-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 15 01:02:07 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1REqlP-0003ja-7q for gllmg-musl@lo.gmane.org; Sat, 15 Oct 2011 01:02:03 +0200 Original-Received: (qmail 1393 invoked by uid 550); 14 Oct 2011 23:02:02 -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 1385 invoked from network); 14 Oct 2011 23:02:02 -0000 Content-Disposition: inline In-Reply-To: <20111014141152.0cb08bee@newbook> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:514 Archived-At: On Fri, Oct 14, 2011 at 02:11:52PM -0700, Isaac Dunham wrote: > On Thu, 13 Oct 2011 21:03:17 -0400 > Rich Felker wrote: > > > But I think the problem is much deeper. This "optimization" is > > necessarily based on the compiler making an assumption about what the > > function named "malloc" does. Compiling the implementation (libc) > > itself requires disabling such assumptions; with gcc, this is achieved > > with -ffreestanding (-fno-builtin will also work). Can you use the > > same or similar option with clang? > > Per the manpage, -ffreestanding and -fno-builtin will work with clang. > -ffreestanding is probably the proper choice, since a new libc is a > freestanding environment. Indeed, but it sounds like this is not fixing the problem. :( Can you confirm that calloc.c is compiled properly when -ffreestanding is used? Rich