JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SPARC Assembly Language Reference Manual     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  SPARC Assembler Syntax

2.  Executable and Linking Format

3.  Directives and Pseudo-Operations

3.1 Assembler Directives

3.1.1 Section Control Directives

3.1.2 Symbol Attribute Directives

3.1.3 Assignment Directive

3.1.4 Data Generating Directives

3.2 Notation

3.3 Alphabetized Listing with Descriptions

3.4 Pseudo-Op Attributes

3.5 Pseudo-Op Examples

3.5.1 Example 1: Binding to C Variables

3.5.2 Example 2: Generating Ident Strings

3.5.3 Example 3: Data Alignment, Size, Scope, and Type

3.5.4 Example 4: "Hello World"

4.  Creating Data in Assembler

5.  SPARC Code Models

6.  Writing Functions -- The SPARC ABI

7.  Assembler Inline Functions and __asm Code

A.  Using the Assembler Command Line

B.  A Sample Assembler Program

C.  SPARC Instruction Sets and Mnemonics

Index

3.4 Pseudo-Op Attributes

Pseudo-ops .global, .section, .register, and .type accept specific attributes that correspond to linker attribute flags, as shown in the following table.

Example: .type sum, #function

Table 3-1 Pseudo-op Linker Attributes

Attribute
Linker Symbol
Accepting Pseudo-op
#alloc
SHF_ALLOC
.section
#annotate
SHT_SUNW_ANNOTATE
.section
#comdat
SHT_SUNW_COMDAT
.group
#eliminate
STV_ELIMINATE
.type
#exclude
SHF_EXCLUDE
.section
#execinstr
SHF_EXECINSTR
.section
#exported
STV_EXPORTED
.type
#fini_array
SHT_FINI_ARRAY
.section
#function
STT_FUNC
.type
#group
SHF_GROUP
.section
#hidden
STV_HIDDEN
.type
#init_array
SHT_INIT_ARRAY
.section
#internal
STV_INTERNAL
.type
#linkafter
SHN_AFTER
.section
#linkbefore
SHN_BEFORE
.section
#linkorder
SHF_LINK_ORDER
.section
#nobits
SHT_NOBITS
.section
#no_type
STT_NOTYPE
.type
#object
STT_OBJECT
.type
#ordered
SHF_ORDERED
.section
#preinit_array
SHT_PREINIT_ARRAY
.section
#progbits
SHT_PROGBITS
.section
#protected
STV_PROTECTED
.type
#scratch
no linker flag
.register
#singleton
STV_SINGLETON
.type
#symbolic
STV_PROTECTED
.type
#tls
SHF_TLS
.section
#tls_object
STT_TLS
.type
#visible
STV_DEFAULT
.type
#write
SHF_WRITE
.section

See the Oracle Solaris 11.1 Linkers and Libraries Guide for details.