Skip Navigation Links | |
Exit Print View | |
SPARC Assembly Language Reference Manual Oracle Solaris 11.1 Information Library |
2. Executable and Linking Format
2.1.2 Predefined User Sections
2.1.2.1 Creating an .init Section in an Object File
2.1.2.2 Creating a .fini Section in an Object File
2.1.3 Predefined Non-User Sections
3. Directives and Pseudo-Operations
6. Writing Functions -- The SPARC ABI
7. Assembler Inline Functions and __asm Code
A. Using the Assembler Command Line
A location is a specific position within a section. Each location is identified by a section and a byte offset from the beginning of the section. The current location is the location within the current section where code is generated.
A location counter tracks the current offset within each section where code or data is being generated. When a section control directive (for example, the .section pseudo-op) is processed, the location information from the location counter associated with the new section is assigned to and stored with the name and value of the current location.
The current location is updated at the end of processing each statement, but can be updated during processing of data-generating assembler directives (for example, the .word pseudo-op).
Note - Each section has one location counter; if more than one section is present, only one location can be current at any time.