Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2006 23:43:02 -0800
From:      Jason Evans <jasone@FreeBSD.ORG>
To:        Andrey Chernov <ache@FreeBSD.ORG>
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
Message-ID:  <B1C2F44D-E40B-452A-8D89-6DE09221B52D@FreeBSD.ORG>
In-Reply-To: <20060112073835.GA14303@nagual.pp.ru>
References:  <200601120728.k0C7SLET069434@repoman.freebsd.org> <20060112073835.GA14303@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B1C2F44D-E40B-452A-8D89-6DE09221B52D>