Parlib is no PIC-capable

We needed some minor changes, mostly to uthread, to be able to build
parlib with -fPIC (and as a .so).

Thanks to the lack of TLS-clobbers, anytime we set_tls_desc and then
access TLS variables in the same function, we need to wrap those
accesses with 'begin_safe_access'.  Otherwise, the compiler will cache
the address of TLS variables and not discard and recompute the address
after a TLS change.

The other big change is that leaq needed to do PC-relative addressing.
Otherwise the asm emits a _32S relocation, which fails when we make a
shared library with parlib.  For a nice review of relocations, check
out: http://www.mindfruit.co.uk/2012/06/relocations-relocations.html
3 files changed