In assembly programming, a segment is an relocatable code/data chunk.

Most assemblers have the distinction of code and data segments. In UNIX, the segments in object files are called text (for program code), data (for initialized data) and bss (for uninitialized data).