The GNU compiler for MicroBlaze supports the -fPIC
and -fpic
switches. These switches enable position independent code
(PIC) generation in the compiler. This feature is used by the Linux operating system
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 and 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.