Gnu Assembler
The GNU Assembler, commonly known as gas
or as
, is the assembler developed by the GNU Project.
It is the default back-end of GCC, and is part of the GNU Binutils package.
The default syntax for as
is AT&T, but it can be used with Intel syntax by using the .intel_syntax
directive.
Program
BSS Segment
The BSS segment contains uninitialized static data, both variables and constants, i.e. global variables and local static variables that are initialized to zero or do not have explicit initialization in source code.
DATA Segment
The data segment contains initialized static variables, that is, global variables and static local variables. The data segment is read/write, since the values of variables can be altered at run time.