From 6c33b018438ee799c29486f21d43d8100bdbd597 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 2 Feb 2022 22:37:20 +0100 Subject: Linux: Use ptrdiff_t for __rseq_offset This matches the data size initial-exec relocations use on most targets. Reviewed-by: Mathieu Desnoyers Reviewed-by: Carlos O'Donell --- sysdeps/nptl/dl-tls_init_tp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/nptl') diff --git a/sysdeps/nptl/dl-tls_init_tp.c b/sysdeps/nptl/dl-tls_init_tp.c index 531a065ed7..1294c91816 100644 --- a/sysdeps/nptl/dl-tls_init_tp.c +++ b/sysdeps/nptl/dl-tls_init_tp.c @@ -46,7 +46,7 @@ rtld_mutex_dummy (pthread_mutex_t *lock) const unsigned int __rseq_flags; const unsigned int __rseq_size attribute_relro; -const int __rseq_offset attribute_relro; +const ptrdiff_t __rseq_offset attribute_relro; void __tls_pre_init_tp (void) @@ -119,7 +119,7 @@ __tls_init_tp (void) all targets support __thread_pointer, so set __rseq_offset only if thre rseq registration may have happened because RSEQ_SIG is defined. */ - extern int offset __asm__ ("__rseq_offset"); + extern ptrdiff_t offset __asm__ ("__rseq_offset"); offset = (char *) &pd->rseq_area - (char *) __thread_pointer (); #endif } -- cgit 1.4.1