From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 46BEB3894C2E for ; Fri, 12 Mar 2021 17:48:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 46BEB3894C2E Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-YxmTllDyNueUhuqQ8C5KYQ-1; Fri, 12 Mar 2021 12:48:38 -0500 X-MC-Unique: YxmTllDyNueUhuqQ8C5KYQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9FF1764AE9 for ; Fri, 12 Mar 2021 17:48:37 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-77.ams2.redhat.com [10.36.112.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5C0359479 for ; Fri, 12 Mar 2021 17:48:36 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 00/18] Repost of pending libpthread removal patches X-From-Line: e032bfa36a62321767bf3c296e00dd6cdd6a5f20 Mon Sep 17 00:00:00 2001 Message-Id: Date: Fri, 12 Mar 2021 18:48:49 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2021 17:48:44 -0000 This series is a repost of: I've made some minor cleanups (removal of weak declarations of symbols moved to libc from sysdeps/nptl/libc-lockP.h; this should help with static linking of libpthread without crashes eventually). I had to move pthread_once before __pthread_unwind_next because of its _Unwind_Resume dependency. The patches after __pthread_unwind_next are new and remove forwarder functionality, and also move pthread_exit. As discussed on the GDB list, the nptl_db support for pthread_key_create is unused by GDB, so I could not write a test for this. Tested on i686-linux-gnu x86_64-linux-gnu. Built with build-many-glibcs.py. Thanks, Florian Florian Weimer (18): nptl: Move pthread_mutex_consistent into libc nptl: Move __pthread_cleanup_routine into libc nptl: Move legacy unwinding implementation into libc nptl: Move legacy cancelation handling into libc as compat symbols nptl: Remove longjmp, siglongjmp from libpthread Legacy unwinder: Remove definition of _Unwind_GetCFA nptl: Move __pthread_cleanup_upto into libc nptl: Move pthread_once and __pthread_once into libc nptl: Move __pthread_unwind_next into libc csu: Move calling main out of __libc_start_main_impl nptl: Move internal __nptl_nthreads variable into libc nptl_db: Introduce DB_MAIN_ARRAY_VARIABLE nptl: Move __pthread_keys global variable into libc nptl: Move __nptl_deallocate_tsd into libc nptl: Move pthread_exit into libc nptl: Move pthread_setcancelstate into libc nptl: Move pthread_setcanceltype into libc nptl: Invoke the set_robust_list system call directly in fork NEWS | 4 +- csu/libc-start.c | 74 +----------- elf/Makefile | 2 + include/setjmp.h | 4 +- libio/iopopen.c | 5 +- misc/error.c | 19 +-- nptl/Makefile | 48 +++++--- nptl/Versions | 48 +++++--- nptl/cleanup_compat.c | 16 ++- nptl/cleanup_defer_compat.c | 72 +++-------- nptl/cleanup_routine.c | 12 +- nptl/forward.c | 28 ----- nptl/libc-cleanup.c | 64 +++++++++- nptl/libc_pthread_init.c | 9 +- nptl/nptl-init.c | 34 +----- nptl/nptl_deallocate_tsd.c | 112 ++++++++++++++++++ .../nptl_nthreads.c | 19 +-- nptl/pt-longjmp.c | 49 -------- nptl/pthreadP.h | 48 ++++---- nptl/pthread_cancel.c | 10 +- nptl/{pt-cleanup.c => pthread_cleanup_upto.c} | 2 +- nptl/pthread_create.c | 98 --------------- nptl/pthread_exit.c | 16 ++- nptl/pthread_keys.c | 24 ++++ nptl/pthread_mutex_consistent.c | 22 +++- nptl/pthread_once.c | 22 +++- nptl/pthread_setcancelstate.c | 6 +- nptl/pthread_setcanceltype.c | 3 +- nptl/tst-cleanup4.c | 5 + nptl/tst-cleanup4aux.c | 5 + nptl/tst-pthread_exit-nothreads-static.c | 19 +++ nptl/tst-pthread_exit-nothreads.c | 28 +++++ nptl/unwind.c | 14 ++- nptl/vars.c | 5 - nptl_db/db-symbols.awk | 1 + nptl_db/structs.def | 9 +- setjmp/Versions | 4 - stdlib/fmtmsg.c | 9 +- sysdeps/arm/Makefile | 5 - sysdeps/arm/nptl/unwind-forcedunwind.c | 25 ---- sysdeps/generic/libc_start_call_main.h | 24 ++++ sysdeps/generic/unwind-dw2.c | 8 -- sysdeps/generic/unwind-resume.c | 14 +++ .../unwind-resume.c} | 5 +- sysdeps/nptl/fork.c | 14 +-- sysdeps/nptl/fork.h | 3 - sysdeps/nptl/jmp-unwind.c | 8 +- sysdeps/nptl/libc-lock.h | 59 ++++----- sysdeps/nptl/libc-lockP.h | 45 +------ sysdeps/nptl/libc_start_call_main.h | 74 ++++++++++++ sysdeps/nptl/pthread-functions.h | 15 --- sysdeps/nptl/pthread.h | 5 +- sysdeps/nptl/unwind-forcedunwind.c | 64 ---------- sysdeps/posix/system.c | 5 +- sysdeps/pthread/Makefile | 2 +- sysdeps/pthread/tst-robust1.c | 4 +- sysdeps/pthread/tst-robust8.c | 2 +- sysdeps/pthread/tst-robust9.c | 4 +- sysdeps/unix/sysv/linux/aarch64/libc.abilist | 15 +++ .../sysv/linux/aarch64/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/alpha/libc.abilist | 15 +++ .../unix/sysv/linux/alpha/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/arc/libc.abilist | 15 +++ .../unix/sysv/linux/arc/libpthread.abilist | 13 -- sysdeps/unix/sysv/linux/arm/be/libc.abilist | 15 +++ .../unix/sysv/linux/arm/be/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/arm/le/libc.abilist | 15 +++ .../unix/sysv/linux/arm/le/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/csky/libc.abilist | 15 +++ .../unix/sysv/linux/csky/libpthread.abilist | 13 -- sysdeps/unix/sysv/linux/fatal-prepare.h | 4 +- sysdeps/unix/sysv/linux/hppa/libc.abilist | 15 +++ .../unix/sysv/linux/hppa/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/i386/libc.abilist | 15 +++ .../unix/sysv/linux/i386/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/ia64/Makefile | 2 +- sysdeps/unix/sysv/linux/ia64/libc.abilist | 15 +++ .../unix/sysv/linux/ia64/libpthread.abilist | 15 --- .../sysv/linux/m68k/coldfire/libc.abilist | 15 +++ .../linux/m68k/coldfire/libpthread.abilist | 15 --- .../unix/sysv/linux/m68k/m680x0/libc.abilist | 15 +++ .../sysv/linux/m68k/m680x0/libpthread.abilist | 15 --- .../sysv/linux/microblaze/be/libc.abilist | 15 +++ .../linux/microblaze/be/libpthread.abilist | 15 --- .../sysv/linux/microblaze/le/libc.abilist | 15 +++ .../linux/microblaze/le/libpthread.abilist | 15 --- .../sysv/linux/mips/mips32/fpu/libc.abilist | 15 +++ .../sysv/linux/mips/mips32/libpthread.abilist | 15 --- .../sysv/linux/mips/mips32/nofpu/libc.abilist | 15 +++ .../sysv/linux/mips/mips64/libpthread.abilist | 15 --- .../sysv/linux/mips/mips64/n32/libc.abilist | 15 +++ .../sysv/linux/mips/mips64/n64/libc.abilist | 15 +++ sysdeps/unix/sysv/linux/nios2/libc.abilist | 15 +++ .../unix/sysv/linux/nios2/libpthread.abilist | 15 --- .../linux/powerpc/powerpc32/fpu/libc.abilist | 15 +++ .../powerpc/powerpc32/libpthread.abilist | 17 --- .../powerpc/powerpc32/nofpu/libc.abilist | 15 +++ .../linux/powerpc/powerpc64/be/libc.abilist | 15 +++ .../powerpc/powerpc64/be/libpthread.abilist | 17 --- .../linux/powerpc/powerpc64/le/libc.abilist | 15 +++ .../powerpc/powerpc64/le/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c | 61 ---------- .../unix/sysv/linux/riscv/rv32/libc.abilist | 15 +++ .../sysv/linux/riscv/rv32/libpthread.abilist | 13 -- .../unix/sysv/linux/riscv/rv64/libc.abilist | 15 +++ .../sysv/linux/riscv/rv64/libpthread.abilist | 13 -- sysdeps/unix/sysv/linux/s390/Versions | 2 +- sysdeps/unix/sysv/linux/s390/jmp-unwind.c | 7 +- .../unix/sysv/linux/s390/libpthread-compat.c | 25 ++++ sysdeps/unix/sysv/linux/s390/pt-longjmp.c | 33 ------ .../unix/sysv/linux/s390/s390-32/libc.abilist | 15 +++ .../linux/s390/s390-32/libpthread.abilist | 18 +-- .../unix/sysv/linux/s390/s390-64/libc.abilist | 15 +++ .../linux/s390/s390-64/libpthread.abilist | 18 +-- sysdeps/unix/sysv/linux/sh/be/libc.abilist | 15 +++ .../unix/sysv/linux/sh/be/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/sh/le/libc.abilist | 15 +++ .../unix/sysv/linux/sh/le/libpthread.abilist | 15 --- .../sysv/linux/sparc/sparc32/libc.abilist | 15 +++ .../linux/sparc/sparc32/libpthread.abilist | 15 --- .../sysv/linux/sparc/sparc64/libc.abilist | 15 +++ .../linux/sparc/sparc64/libpthread.abilist | 15 --- sysdeps/unix/sysv/linux/spawni.c | 5 +- .../unix/sysv/linux/x86_64/64/libc.abilist | 15 +++ .../sysv/linux/x86_64/64/libpthread.abilist | 15 --- .../unix/sysv/linux/x86_64/x32/libc.abilist | 15 +++ .../sysv/linux/x86_64/x32/libpthread.abilist | 15 --- sysdeps/x86/nptl/pt-longjmp.c | 71 ----------- 128 files changed, 1169 insertions(+), 1312 deletions(-) create mode 100644 nptl/nptl_deallocate_tsd.c rename sysdeps/arm/pt-arm-unwind-resume.S => nptl/nptl_nthreads.c (51%) delete mode 100644 nptl/pt-longjmp.c rename nptl/{pt-cleanup.c => pthread_cleanup_upto.c} (98%) create mode 100644 nptl/pthread_keys.c create mode 100644 nptl/tst-pthread_exit-nothreads-static.c create mode 100644 nptl/tst-pthread_exit-nothreads.c delete mode 100644 sysdeps/arm/nptl/unwind-forcedunwind.c create mode 100644 sysdeps/generic/libc_start_call_main.h rename sysdeps/{unix/sysv/linux/ia64/unwind-forcedunwind.c => ia64/unwind-resume.c} (87%) create mode 100644 sysdeps/nptl/libc_start_call_main.h delete mode 100644 sysdeps/nptl/unwind-forcedunwind.c delete mode 100644 sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c create mode 100644 sysdeps/unix/sysv/linux/s390/libpthread-compat.c delete mode 100644 sysdeps/unix/sysv/linux/s390/pt-longjmp.c delete mode 100644 sysdeps/x86/nptl/pt-longjmp.c -- 2.29.2