Re: Yet another BSD licensed replacement: size(1)

From: Joseph Koshy <joseph.koshy_at_gmail.com>
Date: Tue, 4 Mar 2008 12:03:53 +0530
Ed,

>  Today I found out we have a utility in FreeBSD that's 300 KB's in size
>  and is only used to display some fancy numbers, called size(1). (Yeah,
>  300 KB - it is statically linked against libbfd.)
>
>  I thought it would be possible to rewrite size(1) to use libelf. The
>  result:
>
>  GNU size(1);
>
>  | $ size /usr/bin/size
>  |    text          data     bss     dec     hex filename
>  |  309202          1524   16964  327690   5000a size
>
>  My size(1):
>
>  | $ ./size size
>  |    text          data     bss     dec     hex filename
>  |    5209           340      44    5593    15d9 size
>
>  So far I've implemented all common features supported by the GNU
>  version, except one: when you use size -A (the `System V format'), it
>  doesn't calculate the relocated addresses yet. It now prints 0xdeadc0de,
>  but this has to be fixed.
>
>  I haven't tested the utility on any 64-bit systems yet and I know it
>  will probably won't work there yet, but I'll look at these issues soon.
>
>  When finished, it should be a drop-in replacement. The Berkeley format
>  is exactly the same as the original GNU version. The System V format
>  should be almost the same, except for some whitespace.

How does yours compare with Sam Arun Raj's implementation of size(1) in
Perforce?  IIRC it was fairly complete.

See:   http://wiki.freebsd.org/ElfToolChain
and:   //depot/user/samarunraj/elftoolchain/src/usr.bin/size/

Regards,
Koshy
Received on Tue Mar 04 2008 - 05:33:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:28 UTC