This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: how to get "the big picture" with nm, objdump, size for object size?
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Ilya Murav'jov <muravev at yandex dot ru>
- Cc: binutils at sourceware dot org
- Date: Fri, 24 Sep 2010 22:37:37 +0100
- Subject: Re: how to get "the big picture" with nm, objdump, size for object size?
- References: <4C9D10DB.9080909@yandex.ru>
On 24/09/2010 21:58, Ilya Murav'jov wrote:
> Hi all!
>
> I am trying to decrease the object size for my C++ code with nm, size
> and objdump. The 'size' command gives me
> $ size my_obj.o
> text data bss dec hex filename
> 143576 72 208 143856 231f0 my_obj.o
> just 143kb which is much less than real file size (which is 1,6Mb).
>
> So, how can I get what sections occupy so many space? I am sure they
> are debugging symbols and something else; so, how can I sum up numbers
> from output of the tools to get something like 1,6Mb? Googling didn't help.
Use "objdump -h" to get a dump of all the section headers.
cheers,
DaveK