JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
SPARC Assembly Language Reference Manual     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

1.  SPARC Assembler for SunOS 5.x

2.  Assembler Syntax

3.  Executable and Linking Format

3.1 ELF Header

3.2 Sections

3.2.1 Section Header

3.2.2 Predefined User Sections

3.2.2.1 Creating an .init Section in an Object File

3.2.2.2 Creating a .fini Section in an Object File

3.2.3 Predefined Non-User Sections

3.3 Locations

3.4 Addresses

3.5 Relocation Tables

3.6 Symbol Tables

3.7 String Tables

3.8 Assembler Directives

3.8.1 Section Control Directives

3.8.2 Symbol Attribute Directives

3.8.3 Assignment Directive

3.8.4 Data Generating Directives

4.  Converting Files to the New Format

5.  Instruction-Set Mapping

A.  Pseudo-Operations

B.  Examples of Pseudo-Operations

C.  Using the Assembler Command Line

D.  An Example Language Program

E.  SPARC-V9 Instruction Set

Index

3.1 ELF Header

The ELF header is always located at the beginning of the ELF file. It describes the ELF file organization and contains the actual sizes of the object file control structures. The initial bytes of an ELF header specify how the file is to be interpreted.

The ELF header contains the following information:

ehsize

Description: ELF header size in bytes.

entry

Description: Virtual address at which the process is to start. A value of 0 indicates no associated entry point.

flag

Description: Processor-specific flags associated with the file.

ident

Description: Marks the file as an object file and provides machine-independent data to decode and interpret the file contents.

machine

Description: Specifies the required architecture for an individual file. A value of 2 specifies SPARC.

phentsize

Description: Size in bytes of entries in the program header table. All entries are the same size.

phnum

Description: Number of entries in program header table. A value of 0 indicates the file has no program header table.

phoff

Description: Program header table file offset in bytes. The value of 0 indicates no program header.

shentsize

Description: Size in bytes of the section header. A section header is one entry in the section header table; all entries are the same size.

shnum

Description: Number of entries in section header table. A value of 0 indicates the file has no section header table.

shoff

Description: Section header table file offset in bytes. The value of 0 indicates no section header.

shstrndx

Description: Section header table index of the entry associated with the section name string table. A value of SHN_UNDEF indicates the file does not have a section name string table.

type

Description: Identifies the object file type. Table 3-1 describes the reserved object file types.

version

Description: Identifies the object file version.

Table 3-1 shows reserved object file types.

Table 3-1 Reserved Object File Types

Type
Value
Description
none
0
No file type
rel
1
Relocatable file
exec
2
Executable file
dyn
3
Shared object file
core
4
Core file
loproc
0xff00
Processor-specific
hiproc
0xffff
Processor-specific