[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9990.0. "size command" by TKTV20::ASANO () Fri May 30 1997 05:28

Hi.

My customer has a question about 'size' command.
According 'man size', this command prints the section size of an object file.

He wants to know each parameter's unit.  Is it byte? 

And, what does this parameter mean? 

Please teach me.
Thanks. 


[INFORMATION] 

$ls -l a.out 
-rwxr-xr-x  1 asano  tsc   409600 Nov 9 1995 a.out 

$size a.out
text    data   bss   dec    hex 
15384   8192   0     24576  6000 





Best Regards.
Thnks.
Asano@kc 


T.RTitleUserPersonal
Name
DateLines
9990.1QUARRY::nethCraig NethFri May 30 1997 10:5644
>He wants to know each parameter's unit.  Is it byte? 

Yes, it is number of bytes.

>And, what does this parameter mean? 

An executable file is made up of several segments.   One of the segments
is the text segment, which contains the executable object code and
other read only data.

In your file, that segment is :
text  
15384 

bytes long

Another segment is the data segment, which contains initialized, read/write
data:

In your file, that segment is:

data  
8192  

bytes long.

The last segment is the unitialized data segment, which is called the
bss segment (I think that stands for Block Started by a Symbol, but 
I could be wrong - it's an ancient term).   

Your file doesn't have any bss data:  

bss
 0 

The last two numbers are the total byte size of the non-symbol table parts of
the file, in decimal and hex format:  

	dec    hex 
	24576  6000 

If you use the strip command to remove the symbol table from a.out, you'll 
find that the byte size of the file should match the number reported by
the size command.