mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
Linux: Use ptrdiff_t for __rseq_offset
This matches the data size initial-exec relocations use on most targets. Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
80a08d0faa
commit
6c33b01843
@ -1004,7 +1004,7 @@ The manual for the @code{rseq} system call can be found
|
||||
at @uref{https://git.kernel.org/pub/scm/libs/librseq/librseq.git/tree/doc/man/rseq.2}.
|
||||
@end deftp
|
||||
|
||||
@deftypevar {int} __rseq_offset
|
||||
@deftypevar {ptrdiff_t} __rseq_offset
|
||||
@standards{Linux, sys/rseq.h}
|
||||
This variable contains the offset between the thread pointer (as defined
|
||||
by @code{__builtin_thread_pointer} or the thread pointer register for
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -5,5 +5,5 @@ GLIBC_2.17 _dl_mcount F
|
||||
GLIBC_2.17 _r_debug D 0x28
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
@ -4,6 +4,6 @@ GLIBC_2.1 _dl_mcount F
|
||||
GLIBC_2.3 __tls_get_addr F
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
GLIBC_2.4 __stack_chk_guard D 0x8
|
||||
|
@ -4,5 +4,5 @@ GLIBC_2.2 _r_debug D 0x28
|
||||
GLIBC_2.3 __tls_get_addr F
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
@ -4,6 +4,6 @@ GLIBC_2.2 _dl_mcount F
|
||||
GLIBC_2.3 __tls_get_addr F
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
GLIBC_2.4 __stack_chk_guard D 0x8
|
||||
|
@ -6,5 +6,5 @@ GLIBC_2.3 _dl_mcount F
|
||||
GLIBC_2.3 _r_debug D 0x28
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
@ -6,5 +6,5 @@ GLIBC_2.22 __tls_get_addr_opt F
|
||||
GLIBC_2.23 __parse_hwcap_and_convert_at_platform F
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
@ -5,5 +5,5 @@ GLIBC_2.27 _dl_mcount F
|
||||
GLIBC_2.27 _r_debug D 0x28
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
@ -4,5 +4,5 @@ GLIBC_2.2 _r_debug D 0x28
|
||||
GLIBC_2.3 __tls_get_offset F
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
@ -4,5 +4,5 @@ GLIBC_2.2 _r_debug D 0x28
|
||||
GLIBC_2.3 __tls_get_addr F
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
@ -21,6 +21,7 @@
|
||||
/* Architecture-specific rseq signature. */
|
||||
#include <bits/rseq.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <bits/endian.h>
|
||||
@ -172,7 +173,7 @@ struct rseq
|
||||
#endif /* __GLIBC_HAVE_KERNEL_RSEQ */
|
||||
|
||||
/* Offset from the thread pointer to the rseq area. */
|
||||
extern const int __rseq_offset;
|
||||
extern const ptrdiff_t __rseq_offset;
|
||||
|
||||
/* Size of the registered rseq area. 0 if the registration was
|
||||
unsuccessful. */
|
||||
|
@ -4,5 +4,5 @@ GLIBC_2.2.5 _r_debug D 0x28
|
||||
GLIBC_2.3 __tls_get_addr F
|
||||
GLIBC_2.34 __rtld_version_placeholder F
|
||||
GLIBC_2.35 __rseq_flags D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x4
|
||||
GLIBC_2.35 __rseq_offset D 0x8
|
||||
GLIBC_2.35 __rseq_size D 0x4
|
||||
|
Loading…
x
Reference in New Issue
Block a user