Nios II Classic Processor Reference Guide

ID 683620
Date 10/28/2016
Public
Document Table of Contents

7.9.6.1. Global Offset Table

Because shared libraries are position-independent, they can not contain absolute addresses for symbols. Instead, addresses are loaded from the GOT.

The first word of the GOT is filled in by the link editor with the unrelocated address of the _DYNAMIC, which is at the start of the dynamic section. The second and third words are reserved for the dynamic linker.

For information about the dynamic linker, refer to the "Procedure Linkage Table” section.

The linker-defined symbol _GLOBAL_OFFSET_TABLE_ points to the reserved entries at the beginning of the GOT. The linker-defined symbol _gp_got points to the base address used for GOT-relative relocations. The value of _gp_got might vary between object files if the linker creates multiple GOT sections.