From owner-cvs-all@FreeBSD.ORG Thu Jan 12 07:43:09 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.ORG Delivered-To: cvs-all@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6183216A420; Thu, 12 Jan 2006 07:43:09 +0000 (GMT) (envelope-from jasone@FreeBSD.ORG) Received: from lh.synack.net (lh.synack.net [204.152.188.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88ABC43D49; Thu, 12 Jan 2006 07:43:08 +0000 (GMT) (envelope-from jasone@FreeBSD.ORG) Received: by lh.synack.net (Postfix, from userid 100) id 1A6B85E48C7; Wed, 11 Jan 2006 23:43:08 -0800 (PST) Received: from [192.168.168.203] (moscow-cuda-gen2-68-64-60-20.losaca.adelphia.net [68.64.60.20]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by lh.synack.net (Postfix) with ESMTP id 5108A5E4880; Wed, 11 Jan 2006 23:43:06 -0800 (PST) In-Reply-To: <20060112073835.GA14303@nagual.pp.ru> References: <200601120728.k0C7SLET069434@repoman.freebsd.org> <20060112073835.GA14303@nagual.pp.ru> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Jason Evans Date: Wed, 11 Jan 2006 23:43:02 -0800 To: Andrey Chernov X-Mailer: Apple Mail (2.746.2) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on lh.synack.net X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/include libc_private.h src/lib/libc/stdlib Makefile.inc calloc.c malloc.c posix_memalign.3 src/lib/libpthread/thread thr_fork.c src/lib/libthr/thread thr_fork.c src/libexec/rtld-elf malloc.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 07:43:09 -0000 On Jan 11, 2006, at 11:38 PM, Andrey Chernov wrote: > On Thu, Jan 12, 2006 at 07:28:21AM +0000, Jason Evans wrote: >> * Move calloc() from calloc.c to malloc.c. Add a calloc() >> implementation in >> rtld-elf in order to make the loader happy (even though >> calloc() isn't >> used in rtld-elf). > > If it isn't used, what you mean by saying "happy"? Does it means > that new > rtld-elf should be builded/installed before new libc builded/ > installed or > not? rtld-elf needs its own implementation of malloc, but when the application is loaded, the symbols in rtld-elf's malloc.o are overridden. I had numerous problems with this overriding mechanism not working if libc's malloc.o had a calloc symbol, but rtld-elf's malloc.o did not. I can't claim to completely understand why the addition of calloc in rtld-elf was necessary. It's possible that there's another fix, but I don't know what it might be. Jason