diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-10-21 09:03:07 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-10-21 11:05:58 +0300 |
commit | 8d209bffe46c94a0b9e37b82de3f43c86f1f3e5c (patch) | |
tree | 814672605c2f7082c12a051bfd243264d796d1d8 /pthread_start.c | |
parent | c0c286cd5aaeaea49c18dba71a89d66918d667a5 (diff) | |
download | bdwgc-8d209bffe46c94a0b9e37b82de3f43c86f1f3e5c.tar.gz |
Get libpthread.so '.text' mapping only for glibc prior to v2.34 (Linux)
Some libc implementations like bionic (on Android), musl and glibc 2.34
(and later) do not have libpthread.so (because the code implementing
POSIX threads is located in libc.so file).
* include/private/gcconfig.h [GC_LINUX_THREADS && REDIRECT_MALLOC
&& !HAVE_LIBPTHREAD_SO && __GLIBC__ && !GC_GLIBC_PREREQ(2,34)]
(HAVE_LIBPTHREAD_SO): Define macro; move comment from
GC_init_lib_bounds.
* malloc.c [REDIRECT_MALLOC && GC_LINUX_THREADS] (GC_libpthread_start,
GC_libpthread_end): Define variable only if HAVE_LIBPTHREAD_SO.
* malloc.c [REDIRECT_MALLOC && GC_LINUX_THREADS] (GC_init_lib_bounds):
Call GC_text_mapping("libpthread-") only if HAVE_LIBPTHREAD_SO; remove
TODO item.
* malloc.c [REDIRECT_MALLOC && GC_LINUX_THREADS] (calloc): Update and
place comments properly.
* malloc.c [REDIRECT_MALLOC && GC_LINUX_THREADS] (calloc): Check the
caller is in range between GC_libpthread_start and GC_libpthread_end
only if HAVE_LIBPTHREAD_SO.
* malloc.c [REDIRECT_FREE && !REDIRECT_MALLOC_IN_HEADER
&& !IGNORE_FREE && GC_LINUX_THREADS && !USE_PROC_FOR_LIBRARIES] (free):
Likewise.
Diffstat (limited to 'pthread_start.c')
0 files changed, 0 insertions, 0 deletions