From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/513 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] properly terminate linked link of dsos Date: Fri, 14 Oct 2011 14:11:52 -0700 Message-ID: <20111014141152.0cb08bee@newbook> References: <1318427173.165420.11829@legion> <20111012140141.GX132@brightrain.aerifal.cx> <37ae4188867ea36022c6305ae687bd23@exys.org> <05e2d053cdb7c8726eb0f9bcebbbf048@exys.org> <20111014010317.GY132@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1318626734 22930 80.91.229.12 (14 Oct 2011 21:12:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2011 21:12:14 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-514-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 14 23:12:10 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 1REp34-0006Yd-ML for gllmg-musl@lo.gmane.org; Fri, 14 Oct 2011 23:12:10 +0200 Original-Received: (qmail 15558 invoked by uid 550); 14 Oct 2011 21:12:09 -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 15546 invoked from network); 14 Oct 2011 21:12:09 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=C/UjQoHliEd68Bs4J6OdoDEcQQGqc6Qy3sB/tdPgwGfpA8UT/j+zCxjDsfjsHxjLZ2Q43CX72H890kuJjTQR9+v9zuM3PJerGqSlms9PzN0OYZjI+T2drpvlKBjF2+r7poTLOf2eL9R+YxoUfm4QPZryPITRnE9x61c4QyttSsQ=; h=Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20111014010317.GY132@brightrain.aerifal.cx> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:513 Archived-At: 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.