GNU Info

Info Node: (nasm.info)Section 5.2

(nasm.info)Section 5.2


Next: Section 5.2.1 Prev: Section 5.1.1 Up: Chapter 5
Enter node , (file) or (file)node

5.2. `SECTION' or `SEGMENT': Changing and Defining Sections
===========================================================

   The `SECTION' directive (`SEGMENT' is an exactly equivalent synonym)
changes which section of the output file the code you write will be
assembled into. In some object file formats, the number and names of
sections are fixed; in others, the user may make up as many as they
wish.  Hence `SECTION' may sometimes give an error message, or may
define a new section, if you try to switch to a section that does not
(yet) exist.

   The Unix object formats, and the `bin' object format (but see *Note
Section 6.1.3::, all support the standardised section names `.text',
`.data' and `.bss' for the code, data and uninitialised-data sections.
The `obj' format, by contrast, does not recognise these section names
as being special, and indeed will strip off the leading period of any
section name that has one.

Section 5.2.1
The `__SECT__' Macro

automatically generated by info2www version 1.2.2.9