You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right, on x86-32 shared libraries can be built from code compiled "normally", without PIC. The downside is more relocation work at dynamic loading time and inability to share the code of the shared library between several processes that use it. On platforms other than x86-32, this may not work at all.
The most annoying aspect of PIC, from CompCert's back-end viewpoint, is the need to reserve register ebx. Otherwise, there is already a bit of support for not using absolute addressing modes to access global variables (the "Oindirectsymbol" pseudo-instruction), which is already used for MacOS X. This could be reused to provide PIC access to global variables. For function calls, it's a simple matter of calling the "@plt" stubs.
with gcc:
with CompCert this seems to work:
But it would be nice to have support for -fpic.
The text was updated successfully, but these errors were encountered: