* sysdeps/hppa/start.S (_start): Check PIC instead of SHARED. Load
address of $global$ into %dp register earlier. Use pc-relative
instruction sequence for PIC case.
The patched change fixes a regression for executables compiled with the
-p option and linked with gcrt1.o. The executables crash on startup.
This regression was introduced in 2.22 and was noticed in the gcc testsuite.
The definition of SHARED is tested with #ifdef pretty much everywhere
apart from these few places. The tlsdesc.c code seems to be copy and
pasted to a few architectures and there is one instance in the hppa
startup code.
ChangeLog:
2014-07-09 Will Newton <will.newton@linaro.org>
* sysdeps/aarch64/tlsdesc.c (_dl_unmap): Test SHARED with #ifdef.
* sysdeps/arm/tlsdesc.c (_dl_unmap): Likewise.
* sysdeps/i386/tlsdesc.c (_dl_unmap): Likewise.
* sysdeps/x86_64/tlsdesc.c (_dl_unmap): Likewise.
* sysdeps/hppa/start.S (_start): Likewise.