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.