Denys Vlasenko wrote: > On Sunday 11 January 2009 11:15, Carmelo Amoroso wrote: >> [email protected] wrote: >>> Author: vda >>> Date: 2009-01-10 21:02:48 +0000 (Sat, 10 Jan 2009) >>> New Revision: 24747 >>> >>> Log: >>> simple optimizations and style fixes in dynamic loading >>> >> Hi Denys, >> dynamic liner is one of the most sensible piece of code of the uclibc, as >> you know, >> so I don't think that mixing style fixes with optimization is the right way >> to go. > > Sorry. See attached files with cleanups and optimizations > separated. > >> I'd keep things separated, and explicitly highlight when there are not really >> code changes. I'm sure you have tested all and nothing is broken, but right >> now, IMO, >> it's not the time to change code just for style fix (why is not correct, >> anyway ?). > > If you see a mistake, let me know. > >> Could you explain where is the optimization? > > They are all in 2.patch: > > * extern int _dl_secure -> made static. > * ELF signature checks (4 instances): replaced with single uint32_t > comparison. > * ldso/ldso/dl-hash.c: [[email protected]'s patch] do allocation > before if(), since both branches will need it anyway. > * ldso/ldso/ldso.c: add and use _dl_zalloc(), since malloc+memset > is common in that file. Also moved utility functions > before "big" ones - didn't want to add forward declaration for _dl_zalloc(). > thanks Denys, this is what all of us should do at each commit. I'll take this an action for my self.
>> why you are in same part removed >> the cast to the pointer returned by malloc ? > > In C (as opposed to C++), void* can be implicitly converted to any > non-const pointer type. thanks. > -- > vda > carmelo _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
