Position Independent Code - 2025.2 English - UG1400

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2025-11-20
Version
2025.2 English

The GNU compiler for MicroBlaze supports the -fPIC and -fpic switches.

  • These switches enable position independent code (PIC) generation in the compiler.
  • Linux uses this feature only for MicroBlaze to implement shared libraries and relocatable executables.
  • The scheme uses a global offset table (GOT) to relocate all data accesses in the generated code.
  • It also uses a procedure linkage table (PLT) for making function calls into shared libraries.
  • This is the standard convention in GNU-based platforms for generating relocatable code and for dynamically linking against shared libraries.