Date: Sat, 18 May 2013 02:56:23 +0400 From: Alexander Cherepanov <cherepan@...me.ru> To: john-dev@...ts.openwall.com Subject: Re: Unused global symbols in core On 2013-05-13 13:04, Solar Designer wrote: > On Sat, May 11, 2013 at 07:55:25PM +0400, Alexander Cherepanov wrote: >> There are unused global symbols in JtR. Here is the analysis for the core: > > Thanks! What tool are you using to find these? nm + perl -- http://openwall.com/lists/john-dev/2013/05/11/6 . I've added a license and some comments to my perl file and am attaching it this mail with .txt extension for mail archive. Since then I searched for a tool for this but found nothing. Probably it's so easy to do it with perl or grep that nobody cared to create a dedicated tool. In this context the following tool is frequently mentioned: http://skynet.ie/~caolan/Packages/callcatcher.html but it seems to do something else (while also useful). >> 2. Easy to fix: >> DES_KS_table DES_std.o > > Won't fix: making DES_KS_table static, but not DES_KS_current (because > of its use from other source files), may result in them being placed > into different sections on some platforms, which may have performance > impact. Not that performance of this code matters much now that we're > using bitslice DES in almost all cases, but I also don't feel like > putting time into it now, and if I were to put more time into it, I'd be > making more changes. Ok, I see. Maybe add a comment about it into the source file? >> 3. Not used but supposed to be used (described in .h)? >> itoa64 common.o<- common.c:11 > > I actually committed the patch for this, only to notice that itoa64 is > heavily used from other source files in jumbo. Reverted until we > possibly have a #define JOHN_JUMBO or something. Ah, I see now what Jim meant. >> 4. Not used but supposed to be used (described in .h)? >> fmt_default_valid formats.o<- formats.c:257 > > Dropped. There's no valid reason to ever use a fmt_default_valid(). > >> fmt_default_binary formats.o<- formats.c:267 > > Preserved due to use in jumbo. Ok, I completely forgot about jumbo here. -- Alexander Cherepanov View attachment "unused-globals.pl.txt" of type "text/plain" (1218 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.