Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2008 12:03:53 +0530
From:      "Joseph Koshy" <joseph.koshy@gmail.com>
To:        "Ed Schouten" <ed@80386.nl>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Yet another BSD licensed replacement: size(1)
Message-ID:  <84dead720803032233m6881e888m6ff69c464a4a3d17@mail.gmail.com>
In-Reply-To: <20080303200219.GF80576@hoeg.nl>
References:  <20080303200219.GF80576@hoeg.nl>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84dead720803032233m6881e888m6ff69c464a4a3d17>