.dwsect pseudo-op
Purpose
Defines a section for saving DWARF debugging information for use by a symbolic debugger.
Syntax
Description
The .dwsect pseudo-op identifies the beginning or continuation of a section containing data to be used by the symbolic debugger. A corresponding DWARF symbol is generated as well. All data-definition pseudo-ops can be used following the .dwsect pseudo-op, but the data generated within a DWARF section is not aligned. A dwarf section can be continued with a .dwsect statement having the same flag.
Multiple DWARF symbols can be generated for the same flag value by specifying the opt-label parameter. The data for a given opt-label and flag parameters is collected and prepended with the length (except for the .dwabrev section, which does not have a length field). In 32-bit mode, the length field is 4 bytes long and in 64-bit mode it is 12 bytes. The data for all sections with the same flag value is then concatenated and saved in the DWARF section identified by the flag.
When DWARF sections are specified, the pseudo-ops used to specify the symbol table entries for debuggers are not required.
Parameters
| Item | Description |
|---|---|
| flag | Specifies the type of DWARF section. The following are the valid values: |
|
|
| opt-label | Specifies the DWARF symbols that are generated for each unique flag, opt-label pair. The opt-label identifer is only used to match other .dwsect statements with the same flag value, and does not appear in the output object file. The opt-label parameter is an optional label identifying a particular DWARF symbol. |
Examples
- Define a .dwinfo section.
.dwsect 0x00010000 # section name .dwinfo .dwinfo: .short 0x0002 # dwarf version .long .dwabrev # Reference to .dwabrev section .llong 0x04012f7473743133 ... - Define a .dwabrev section.
.dwsect 0x00060000 # section name .dwabrev .dwabrev: .llong 0x0111010308100611 .llong 0x011201130b1b0825 - Continue data for the first .dwinfo symbol from the first
example.
.dwsect 0x10000 .llong 0x312f6469732f6432 - Define a second .dwinfo symbol.
.dwsect 0x10000,dwinfo_2 .short 2 # Version number