Go to main content

Oracle® Solaris 11.4 Linkers and Libraries Guide

Exit Print View

Updated: October 2019
 
 

Data Encoding

A file's data encoding specifies how to interpret the integer types in a file. Class ELFCLASS32 files and class ELFCLASS64 files use integers that occupy 1, 2, 4, and 8 bytes to represent offsets, addresses and other information. Under the defined encodings, objects are represented as described by the figures that follow. Byte numbers appear in the upper left corners.

ELFDATA2LSB encoding specifies 2's complement values, with the least significant byte occupying the lowest address. This encoding if often referred to informally as little endian.

Figure 8  Data Encoding ELFDATA2LSB

image:ELFDATA2LSB data encoding.

ELFDATA2MSB encoding specifies 2's complement values, with the most significant byte occupying the lowest address. This encoding if often referred to informally as big endian.

Figure 9  Data Encoding ELFDATA2MSB

image:ELFDATA2MSB data encoding.