System V (SysV) has a defined model for accessing the program and imported data and code from other modules.
If required, the linker automatically generates the required Procedure Linkage Table (PLT) and Global Offset
Table (GOT) sections.
Position independent code
SysV shared libraries are compiled with position independent code using the
-fpic compiler command-line
option.
You must also use the linker command-line option --fpic to declare that a
shared library is position independent because this affects the construction of the PLT and
GOT sections.
Note:
By default, the linker produces an error message if the command-line option
--shared is given without the --fpic options. If you
must create a shared library that is not position independent, you can turn the error
message off by using --diag_suppress=6403.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.