Determining the Size of the Text Segment, Data Segment, and “bss” or Uninitialized Data Segment


size utility lists the section sizes–and the total size–for each of the object files objfile in its argument list. By default, one line of output is generated for each object file or each module in an archive.

Definations of each sentions:

Text segment: The machine instructions that the CPU executes. This is usually read only and sharable.

Data segment: Contains initialized variables in a program. You also know these as declarations and definitions.

Uninitialized data segment: Think of this as a declaration only, or data that is only initialized by the kernel to arithmetic 0 or null pointers before program execution.

[ manpage ]

To pull up information from data segments with size: size -t /bin/sh /bin/bash

2008-01-28-065828_1280x800_scrot.png



Subscribe without commenting


Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.