mirror of git://sourceware.org/git/glibc.git
hppa: assume TLS everywhere
This brings hppa inline with all the other arches and main code where we require TLS support everywhere. That means dropping the defines USE_TLS and USE___THREAD, and dropping the binutils check (since we already have a version requirement that is new enough).
This commit is contained in:
parent
3fb4cfaf1f
commit
43329fe139
|
|
@ -1,3 +1,11 @@
|
|||
2015-08-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sysdeps/hppa/configure.ac: Delete binutils tls checks.
|
||||
* sysdeps/hppa/configure: Regenerated.
|
||||
* sysdeps/hppa/dl-machine.h: Delete USE_TLS and USE___THREAD checks.
|
||||
* sysdeps/hppa/libc-tls.c: Delete USE_TLS checks.
|
||||
* sysdeps/hppa/nptl/tls.h: Likewise.
|
||||
|
||||
2015-08-17 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
[BZ #18823]
|
||||
|
|
|
|||
|
|
@ -30,60 +30,3 @@ $as_echo "$libc_cv_asm_line_sep" >&6; }
|
|||
cat >>confdefs.h <<_ACEOF
|
||||
#define ASM_LINE_SEP $libc_cv_asm_line_sep
|
||||
_ACEOF
|
||||
|
||||
|
||||
# Check for support of thread-local storage handling in assembler and
|
||||
# linker.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5
|
||||
$as_echo_n "checking for hppa TLS support... " >&6; }
|
||||
if ${libc_cv_hppa_tls+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat > conftest.s <<\EOF
|
||||
; Setup tls data
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .data 32
|
||||
.text
|
||||
; Test general dyanmic relocations
|
||||
test0:
|
||||
addil LT'foo-$tls_gdidx$, %r19
|
||||
ldo RT'foo-$tls_gdidx$(%r1), %r26
|
||||
b __tls_get_addr
|
||||
nop
|
||||
; Test local dynamic relocations
|
||||
test1:
|
||||
addil LT'foo-$tls_ldidx$, %r19
|
||||
b __tls_get_addr
|
||||
ldo RT'foo-$tls_ldidx$(%r1), %r26
|
||||
ldo RR'foo-$tls_dtpoff$(%r1), %r25
|
||||
; More variables can be loaded...
|
||||
; Test initial exec reloctiosn
|
||||
test2:
|
||||
mfctl %cr27, %r26
|
||||
addil LT'foo-$tls_ieoff$, %r19
|
||||
ldw RT'foo-$tls_ieoff$(%r1), %r25
|
||||
add %r26, %r25, %r24
|
||||
; Test local exec relocations
|
||||
test3:
|
||||
mfctl %cr27, %r26
|
||||
addil LR'foo-$tls_leoff$, %r26
|
||||
ldo RR'foo-$tls_leoff$(%r1), %r25
|
||||
; Done all the TLS tests.
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
|
||||
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; }; then
|
||||
libc_cv_hppa_tls=yes
|
||||
else
|
||||
libc_cv_hppa_tls=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5
|
||||
$as_echo "$libc_cv_hppa_tls" >&6; }
|
||||
if test $libc_cv_hppa_tls = no; then
|
||||
as_fn_error $? "the assembler must support TLS" "$LINENO" 5
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -19,48 +19,3 @@ else
|
|||
fi
|
||||
rm -f conftest*])
|
||||
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
|
||||
|
||||
# Check for support of thread-local storage handling in assembler and
|
||||
# linker.
|
||||
AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl
|
||||
cat > conftest.s <<\EOF
|
||||
; Setup tls data
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .data 32
|
||||
.text
|
||||
; Test general dyanmic relocations
|
||||
test0:
|
||||
addil LT'foo-$tls_gdidx$, %r19
|
||||
ldo RT'foo-$tls_gdidx$(%r1), %r26
|
||||
b __tls_get_addr
|
||||
nop
|
||||
; Test local dynamic relocations
|
||||
test1:
|
||||
addil LT'foo-$tls_ldidx$, %r19
|
||||
b __tls_get_addr
|
||||
ldo RT'foo-$tls_ldidx$(%r1), %r26
|
||||
ldo RR'foo-$tls_dtpoff$(%r1), %r25
|
||||
; More variables can be loaded...
|
||||
; Test initial exec reloctiosn
|
||||
test2:
|
||||
mfctl %cr27, %r26
|
||||
addil LT'foo-$tls_ieoff$, %r19
|
||||
ldw RT'foo-$tls_ieoff$(%r1), %r25
|
||||
add %r26, %r25, %r24
|
||||
; Test local exec relocations
|
||||
test3:
|
||||
mfctl %cr27, %r26
|
||||
addil LR'foo-$tls_leoff$, %r26
|
||||
ldo RR'foo-$tls_leoff$(%r1), %r25
|
||||
; Done all the TLS tests.
|
||||
EOF
|
||||
dnl
|
||||
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||
libc_cv_hppa_tls=yes
|
||||
else
|
||||
libc_cv_hppa_tls=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_hppa_tls = no; then
|
||||
AC_MSG_ERROR([the assembler must support TLS])
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ asm ( \
|
|||
a TLS variable, so references should not be allowed to define the value.
|
||||
ELF_RTYPE_CLASS_COPY iff TYPE should not be allowed to resolve to one
|
||||
of the main executable's symbols, as for a COPY reloc. */
|
||||
#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
|
||||
#if !defined RTLD_BOOTSTRAP
|
||||
# define elf_machine_type_class(type) \
|
||||
((((type) == R_PARISC_IPLT \
|
||||
|| (type) == R_PARISC_EPLT \
|
||||
|
|
@ -684,7 +684,7 @@ elf_machine_rela (struct link_map *map,
|
|||
MIN (sym->st_size, refsym->st_size));
|
||||
return;
|
||||
|
||||
#if defined USE_TLS && (!defined RTLD_BOOTSTRAP)
|
||||
#if !defined RTLD_BOOTSTRAP
|
||||
case R_PARISC_TLS_DTPMOD32:
|
||||
value = sym_map->l_tls_modid;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
#include <csu/libc-tls.c>
|
||||
#include <dl-tls.h>
|
||||
|
||||
#if USE_TLS
|
||||
|
||||
/* On hppa, linker optimizations are not required, so __tls_get_addr
|
||||
can be called even in statically linked binaries. In this case module
|
||||
must be always 1 and PT_TLS segment exist in the binary, otherwise it
|
||||
|
|
@ -32,5 +30,3 @@ __tls_get_addr (tls_index *ti)
|
|||
dtv_t *dtv = THREAD_DTV ();
|
||||
return (char *) dtv[1].pointer.val + ti->ti_offset;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -41,9 +41,6 @@ typedef union dtv
|
|||
# include <tcb-offsets.h>
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
/* Signal that TLS support is available. */
|
||||
#define USE_TLS 1
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
/* Get system call information. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue