Module Name:    src
Committed By:   riastradh
Date:           Fri Nov 22 15:51:34 UTC 2024

Modified Files:
        src/lib/libpthread: Makefile
Added Files:
        src/lib/libpthread: pthread_mi.expsym pthread_ras.expsym
        src/lib/libpthread/arch/alpha: pthread_md.expsym
        src/lib/libpthread/arch/hppa: pthread_md.expsym
Removed Files:
        src/lib/libpthread: pthread.expsym

Log Message:
libpthread: Fix expected symbols on alpha and hppa.

These have PTHREAD__ASM_RASOPS and define a different subset of
symbols which get exported.  None of these pthread__ras_* and
pthread__lock_* symbols _should_ be exported but we can fix that in a
future revbump.

PR lib/58838: shared libraries in base should all have expsym lists


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/lib/libpthread/Makefile
cvs rdiff -u -r1.1 -r0 src/lib/libpthread/pthread.expsym
cvs rdiff -u -r0 -r1.1 src/lib/libpthread/pthread_mi.expsym \
    src/lib/libpthread/pthread_ras.expsym
cvs rdiff -u -r0 -r1.1 src/lib/libpthread/arch/alpha/pthread_md.expsym
cvs rdiff -u -r0 -r1.1 src/lib/libpthread/arch/hppa/pthread_md.expsym

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/Makefile
diff -u src/lib/libpthread/Makefile:1.98 src/lib/libpthread/Makefile:1.99
--- src/lib/libpthread/Makefile:1.98	Thu Sep 14 03:17:02 2023
+++ src/lib/libpthread/Makefile	Fri Nov 22 15:51:34 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.98 2023/09/14 03:17:02 rin Exp $
+#	$NetBSD: Makefile,v 1.99 2024/11/22 15:51:34 riastradh Exp $
 #
 
 NOSANITIZER=	# defined
@@ -32,6 +32,23 @@ INCSDIR=/usr/include
 ARCHDIR=	${.CURDIR}/arch/${ARCHSUBDIR}
 .PATH:	${ARCHDIR}
 
+EXPSYM_SRCS+=	pthread_mi.expsym
+.  if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "hppa"
+# PTHREAD__ASM_RASOPS
+EXPSYM_SRCS+=	pthread_md.expsym
+.  else
+# !PTHREAD__ASM_RASOPS
+# XXX These really shouldn't be exported.
+EXPSYM_SRCS+=	pthread_ras.expsym
+.  endif
+
+LIB_EXPSYM=	pthread.expsym
+pthread.expsym: ${EXPSYM_SRCS}
+	${_MKTARGET_CREATE}
+	LC_ALL=C sort -m ${.ALLSRC} >${.TARGET}.tmp && \
+	${MV} ${.TARGET}.tmp ${.TARGET}
+CLEANFILES+=	pthread.expsym pthread.expsym.tmp
+
 CPPFLAGS+=	-I${ARCHDIR} -I${.CURDIR} -I${.OBJDIR} -D_LIBC -D_REENTRANT
 CPPFLAGS+=	-I${.CURDIR}/../libc/include
 CPPFLAGS+=	-D__LIBPTHREAD_SOURCE__ -D__LIBC_THREAD_STUBS

Added files:

Index: src/lib/libpthread/pthread_mi.expsym
diff -u /dev/null src/lib/libpthread/pthread_mi.expsym:1.1
--- /dev/null	Fri Nov 22 15:51:34 2024
+++ src/lib/libpthread/pthread_mi.expsym	Fri Nov 22 15:51:34 2024
@@ -0,0 +1,282 @@
+___msync13
+___nanosleep50
+__aio_suspend50
+__kevent100
+__libc_cond_broadcast
+__libc_cond_destroy
+__libc_cond_init
+__libc_cond_signal
+__libc_cond_timedwait
+__libc_cond_wait
+__libc_mutex_destroy
+__libc_mutex_init
+__libc_mutex_lock
+__libc_mutex_trylock
+__libc_mutex_unlock
+__libc_mutexattr_destroy
+__libc_mutexattr_init
+__libc_mutexattr_settype
+__libc_rwlock_destroy
+__libc_rwlock_init
+__libc_rwlock_rdlock
+__libc_rwlock_tryrdlock
+__libc_rwlock_trywrlock
+__libc_rwlock_unlock
+__libc_rwlock_wrlock
+__libc_thr_create
+__libc_thr_curcpu
+__libc_thr_equal
+__libc_thr_errno
+__libc_thr_exit
+__libc_thr_getspecific
+__libc_thr_init
+__libc_thr_keycreate
+__libc_thr_keydelete
+__libc_thr_once
+__libc_thr_self
+__libc_thr_setcancelstate
+__libc_thr_setspecific
+__libc_thr_sigsetmask
+__libc_thr_yield
+__mq_timedreceive50
+__mq_timedsend50
+__msync13
+__nanosleep50
+__pollts50
+__pselect50
+__res_get_state
+__res_put_state
+__res_state
+__select50
+__sigprocmask14
+__sigsuspend14
+__sigtimedwait50
+__uselibcstub
+__wait450
+_clock_nanosleep
+_close
+_fcntl
+_fdatasync
+_fsync
+_fsync_range
+_mq_receive
+_mq_send
+_msgrcv
+_msgsnd
+_open
+_openat
+_poll
+_pread
+_pthread_attr_get_np
+_pthread_cond_has_waiters_np
+_pthread_mutex_held_np
+_pthread_mutex_owner_np
+_pthread_rwlock_held_np
+_pthread_rwlock_rdheld_np
+_pthread_rwlock_wrheld_np
+_pwrite
+_read
+_readv
+_recvfrom
+_recvmmsg
+_recvmsg
+_sendmmsg
+_sendmsg
+_sendto
+_sigwait
+_write
+_writev
+accept
+call_once
+clock_nanosleep
+close
+cnd_broadcast
+cnd_destroy
+cnd_init
+cnd_signal
+cnd_timedwait
+cnd_wait
+connect
+fcntl
+fdatasync
+fsync
+fsync_range
+mq_receive
+mq_send
+msgrcv
+msgsnd
+mtx_destroy
+mtx_init
+mtx_lock
+mtx_timedlock
+mtx_trylock
+mtx_unlock
+open
+openat
+poll
+pread
+pthread__allqueue
+pthread__alltree_lock
+pthread__cancel_stub_binder
+pthread__cleanup_pop
+pthread__cleanup_push
+pthread__concurrency
+pthread__dbg
+pthread__deadqueue
+pthread__deadqueue_lock
+pthread__errno
+pthread__guardsize
+pthread__init
+pthread__lock_ops
+pthread__nspins
+pthread__pagesize
+pthread__sched_yield
+pthread__stacksize
+pthread__started
+pthread__static_lib_binder
+pthread__tsd_destructors
+pthread__tsd_list
+pthread__unpark_max
+pthread_attr_destroy
+pthread_attr_get_np
+pthread_attr_getdetachstate
+pthread_attr_getguardsize
+pthread_attr_getinheritsched
+pthread_attr_getname_np
+pthread_attr_getschedparam
+pthread_attr_getschedpolicy
+pthread_attr_getscope
+pthread_attr_getstack
+pthread_attr_getstackaddr
+pthread_attr_getstacksize
+pthread_attr_init
+pthread_attr_setcreatesuspend_np
+pthread_attr_setdetachstate
+pthread_attr_setguardsize
+pthread_attr_setinheritsched
+pthread_attr_setname_np
+pthread_attr_setschedparam
+pthread_attr_setschedpolicy
+pthread_attr_setscope
+pthread_attr_setstack
+pthread_attr_setstackaddr
+pthread_attr_setstacksize
+pthread_barrier_destroy
+pthread_barrier_init
+pthread_barrier_wait
+pthread_barrierattr_destroy
+pthread_barrierattr_init
+pthread_cancel
+pthread_cond_broadcast
+pthread_cond_destroy
+pthread_cond_has_waiters_np
+pthread_cond_init
+pthread_cond_signal
+pthread_cond_timedwait
+pthread_cond_wait
+pthread_condattr_destroy
+pthread_condattr_getclock
+pthread_condattr_init
+pthread_condattr_setclock
+pthread_create
+pthread_curcpu_np
+pthread_detach
+pthread_equal
+pthread_exit
+pthread_getaffinity_np
+pthread_getattr_np
+pthread_getcpuclockid
+pthread_getname_np
+pthread_getschedparam
+pthread_getspecific
+pthread_join
+pthread_key_create
+pthread_key_delete
+pthread_keys_max
+pthread_kill
+pthread_mutex_destroy
+pthread_mutex_getprioceiling
+pthread_mutex_held_np
+pthread_mutex_init
+pthread_mutex_lock
+pthread_mutex_owner_np
+pthread_mutex_setprioceiling
+pthread_mutex_timedlock
+pthread_mutex_trylock
+pthread_mutex_unlock
+pthread_mutexattr_destroy
+pthread_mutexattr_getprioceiling
+pthread_mutexattr_getprotocol
+pthread_mutexattr_gettype
+pthread_mutexattr_init
+pthread_mutexattr_setprioceiling
+pthread_mutexattr_setprotocol
+pthread_mutexattr_settype
+pthread_once
+pthread_resume_np
+pthread_rwlock_destroy
+pthread_rwlock_held_np
+pthread_rwlock_init
+pthread_rwlock_rdheld_np
+pthread_rwlock_rdlock
+pthread_rwlock_timedrdlock
+pthread_rwlock_timedwrlock
+pthread_rwlock_tryrdlock
+pthread_rwlock_trywrlock
+pthread_rwlock_unlock
+pthread_rwlock_wrheld_np
+pthread_rwlock_wrlock
+pthread_rwlockattr_destroy
+pthread_rwlockattr_init
+pthread_self
+pthread_setaffinity_np
+pthread_setcancelstate
+pthread_setcanceltype
+pthread_setcontext
+pthread_setname_np
+pthread_setschedparam
+pthread_setschedprio
+pthread_setspecific
+pthread_sigmask
+pthread_spin_destroy
+pthread_spin_init
+pthread_spin_lock
+pthread_spin_trylock
+pthread_spin_unlock
+pthread_suspend_np
+pthread_testcancel
+pwrite
+read
+readv
+recvfrom
+recvmmsg
+recvmsg
+sem_close
+sem_destroy
+sem_getvalue
+sem_init
+sem_open
+sem_post
+sem_timedwait
+sem_trywait
+sem_unlink
+sem_wait
+sendmmsg
+sendmsg
+sendto
+setcontext
+sigwait
+thrd_create
+thrd_current
+thrd_detach
+thrd_equal
+thrd_exit
+thrd_join
+thrd_sleep
+thrd_yield
+tss_create
+tss_delete
+tss_get
+tss_set
+write
+writev
Index: src/lib/libpthread/pthread_ras.expsym
diff -u /dev/null src/lib/libpthread/pthread_ras.expsym:1.1
--- /dev/null	Fri Nov 22 15:51:34 2024
+++ src/lib/libpthread/pthread_ras.expsym	Fri Nov 22 15:51:34 2024
@@ -0,0 +1,2 @@
+pthread__lock_ras_end
+pthread__lock_ras_start

Index: src/lib/libpthread/arch/alpha/pthread_md.expsym
diff -u /dev/null src/lib/libpthread/arch/alpha/pthread_md.expsym:1.1
--- /dev/null	Fri Nov 22 15:51:34 2024
+++ src/lib/libpthread/arch/alpha/pthread_md.expsym	Fri Nov 22 15:51:34 2024
@@ -0,0 +1,5 @@
+pthread__lock_ras_end
+pthread__lock_ras_start
+pthread__ras_simple_lock_init
+pthread__ras_simple_lock_try
+pthread__ras_simple_unlock

Index: src/lib/libpthread/arch/hppa/pthread_md.expsym
diff -u /dev/null src/lib/libpthread/arch/hppa/pthread_md.expsym:1.1
--- /dev/null	Fri Nov 22 15:51:34 2024
+++ src/lib/libpthread/arch/hppa/pthread_md.expsym	Fri Nov 22 15:51:34 2024
@@ -0,0 +1,3 @@
+pthread__ras_simple_lock_init
+pthread__ras_simple_lock_try
+pthread__ras_simple_unlock

Reply via email to