Re: computing/comparing object size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/16/06, Jim Cromie <jim.cromie@xxxxxxxxx> wrote:
<!-- snip -->
>
> can someone explain:
> a. what command to run to get those numbers

size - "man size" (see also "man objdump"  the -x and -h switches).

> b. what the numbers mean
> c. how the segments differ wrt sharability, readonlyness, etc

.text (executable code) is sharable

.data is (as far as I remember) the sum of the uninitialized and
initialized variable segments.

.bss (block started by symbol) contains uninitialized global
variables, they will be initialized to zero upon load - as far as I
remember this is not sharable.

"dec" and "hex" is the filesize in decimal and hexadecimal.


> d. how they relate to numbers from 'nm -S nada.o nada.ko',
>     readelf -S nada.o, objdump -h nada.o
>
readelf -S & objdum -h list the same (and more data) as "size" - size
just list a few sections (the interresting ones in most cases).

--
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux