Message ID | cover.1621446837.git.fweimer@redhat.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1FF403947C0C; Wed, 19 May 2021 18:03:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FF403947C0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1621447425; bh=K0aG64uIdUyBT0Jx51llZ/RMH4d7F+eTi88qu3Ih6Xc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=IqOJoyslgR9SthVfjFxXmeYQzroTHa0Ybrto5WLHVms3V2LP4HQ7d68egGt00fjkj hQ1Dm7rATGCVyEVR1ao9t0srJ2xhdMF6WvKJ+xLGf4/Z07L0QcuhQvqBfgQyB1jkGk G7oFXZg50h2lGhuwavop8/hxvRsn1p4VSmlUcyVA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 2EB253943409 for <libc-alpha@sourceware.org>; Wed, 19 May 2021 18:03:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2EB253943409 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-581-XmVumavTMpud6p9yOJiGMQ-1; Wed, 19 May 2021 14:03:38 -0400 X-MC-Unique: XmVumavTMpud6p9yOJiGMQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 849EE9F7C6 for <libc-alpha@sourceware.org>; Wed, 19 May 2021 18:03:37 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-137.ams2.redhat.com [10.36.112.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB5FA60917 for <libc-alpha@sourceware.org>; Wed, 19 May 2021 18:03:36 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 00/14] Move libdl into libc X-From-Line: 3153ab9c80b3bba067e7472a05a89c164dbf0daa Mon Sep 17 00:00:00 2001 Message-Id: <cover.1621446837.git.fweimer@redhat.com> Date: Wed, 19 May 2021 20:03:34 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.7 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Florian Weimer <fweimer@redhat.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
Move libdl into libc
|
|
Message
Florian Weimer
May 19, 2021, 6:03 p.m. UTC
This patch series removes all code from libdl.so.2. I have not removed the shared object itself because I want to mirror what we are doing for libpthread, and the discussion there is still ongoing. There is an oddity because for several targets, the baseline ABI version for libdl is GLIBC_2.0 and not GLIBC_2.2. This cannot be expressed with the existing Versions framework. Since the affected targets are more or less on the way out anyway (hppa, ia64, sh, sparc64), I didn't overdesign the solution and emitted the required version nodes directly in scripts/versions.awk. This move also happens on Hurd because the implementation isn't separate. This fixes a POSIX conformance issue with the c99 command because POSIX requires that dlopen etc. are available without -ldl. Tested on i386-linux-gnu and x86_64-linux-gnu. Built with build-many-glibcs.py (including most intermediate steps). Thanks, Florian Florian Weimer (14): stdio-common: Remove _IO_vfwscanf Add libc ABI extension kludge for baseline-violating libdl symbols dlfcn: Move dlerror into libc dlfcn: Move dlclose into libc dlfcn: Move dladdr into libc dlfcn: Move dlsym into libc dlfcn: Move dlmopen into libc dlfcn: Move dladdr1 into libc dlfcn: Move dlinfo into libc dlfcn: Move dlvsym into libc dlfcn: Move dlopen into libc dlfcn: Cleanups after -ldl is no longer required dlfcn: Eliminate GLIBC_PRIVATE dependency from tststatic2 dlfcn: Rework static dlopen hooks Makeconfig | 6 - dlfcn/Makefile | 48 ++--- dlfcn/Versions | 42 ++++- dlfcn/dladdr.c | 24 +-- dlfcn/dladdr1.c | 24 +-- dlfcn/dlclose.c | 32 +--- dlfcn/dlerror.c | 67 ++----- dlfcn/dlfcn.c | 41 +++-- dlfcn/dlinfo.c | 47 ++--- dlfcn/dlmopen.c | 67 +++---- dlfcn/dlopen.c | 76 ++++---- dlfcn/dlopenold.c | 6 +- dlfcn/dlsym.c | 59 +++--- dlfcn/dlvsym.c | 67 ++++--- dlfcn/modstatic2.c | 3 +- dlfcn/sdladdr.c | 1 - dlfcn/sdladdr1.c | 1 - dlfcn/sdlclose.c | 1 - dlfcn/sdlerror.c | 1 - dlfcn/sdlinfo.c | 1 - dlfcn/sdlmopen.c | 1 - dlfcn/sdlopen.c | 1 - dlfcn/sdlsym.c | 1 - dlfcn/sdlvsym.c | 1 - dlfcn/tststatic2.c | 3 +- elf/Makefile | 173 +++--------------- elf/Versions | 1 - elf/dl-libc.c | 73 +------- elf/dl-sym.c | 3 +- elf/rtld_static_init.c | 18 ++ htl/Makefile | 1 - iconvdata/Makefile | 1 - include/dlfcn.h | 81 +++----- malloc/Makefile | 3 - misc/Makefile | 2 - nptl/Makefile | 10 +- nss/Makefile | 5 - resolv/Makefile | 19 +- scripts/versions.awk | 36 +++- stdio-common/Makefile | 2 +- stdio-common/iovfwscanf.c | 38 ---- stdlib/Makefile | 8 +- string/Makefile | 1 - sysdeps/generic/ldsodefs.h | 3 + sysdeps/mach/hurd/i386/libc.abilist | 18 ++ sysdeps/mach/hurd/i386/libdl.abilist | 12 +- sysdeps/mips/Makefile | 1 - sysdeps/pthread/Makefile | 6 +- sysdeps/unix/sysv/linux/aarch64/libc.abilist | 18 ++ sysdeps/unix/sysv/linux/aarch64/libdl.abilist | 10 +- sysdeps/unix/sysv/linux/alpha/libc.abilist | 19 ++ sysdeps/unix/sysv/linux/alpha/libdl.abilist | 14 +- sysdeps/unix/sysv/linux/arc/libc.abilist | 18 ++ sysdeps/unix/sysv/linux/arc/libdl.abilist | 10 +- sysdeps/unix/sysv/linux/arm/be/libc.abilist | 18 ++ sysdeps/unix/sysv/linux/arm/be/libdl.abilist | 10 +- sysdeps/unix/sysv/linux/arm/le/libc.abilist | 18 ++ sysdeps/unix/sysv/linux/arm/le/libdl.abilist | 10 +- sysdeps/unix/sysv/linux/csky/libc.abilist | 18 ++ sysdeps/unix/sysv/linux/csky/libdl.abilist | 10 +- sysdeps/unix/sysv/linux/hppa/Versions | 1 + sysdeps/unix/sysv/linux/hppa/libc.abilist | 19 ++ sysdeps/unix/sysv/linux/hppa/libdl.abilist | 14 +- sysdeps/unix/sysv/linux/i386/libc.abilist | 19 ++ sysdeps/unix/sysv/linux/i386/libdl.abilist | 14 +- sysdeps/unix/sysv/linux/ia64/Versions | 1 + sysdeps/unix/sysv/linux/ia64/libc.abilist | 19 ++ sysdeps/unix/sysv/linux/ia64/libdl.abilist | 14 +- .../sysv/linux/m68k/coldfire/libc.abilist | 18 ++ .../sysv/linux/m68k/coldfire/libdl.abilist | 10 +- .../unix/sysv/linux/m68k/m680x0/libc.abilist | 19 ++ .../unix/sysv/linux/m68k/m680x0/libdl.abilist | 14 +- .../sysv/linux/microblaze/be/libc.abilist | 18 ++ .../sysv/linux/microblaze/be/libdl.abilist | 10 +- .../sysv/linux/microblaze/le/libc.abilist | 18 ++ .../sysv/linux/microblaze/le/libdl.abilist | 10 +- .../sysv/linux/mips/mips32/fpu/libc.abilist | 19 ++ .../unix/sysv/linux/mips/mips32/libdl.abilist | 14 +- .../sysv/linux/mips/mips32/nofpu/libc.abilist | 19 ++ .../unix/sysv/linux/mips/mips64/libdl.abilist | 14 +- .../sysv/linux/mips/mips64/n32/libc.abilist | 19 ++ .../sysv/linux/mips/mips64/n64/libc.abilist | 19 ++ sysdeps/unix/sysv/linux/nios2/libc.abilist | 18 ++ sysdeps/unix/sysv/linux/nios2/libdl.abilist | 10 +- .../linux/powerpc/powerpc32/fpu/libc.abilist | 19 ++ .../linux/powerpc/powerpc32/libdl.abilist | 14 +- .../powerpc/powerpc32/nofpu/libc.abilist | 19 ++ .../linux/powerpc/powerpc64/be/libc.abilist | 18 ++ .../linux/powerpc/powerpc64/be/libdl.abilist | 12 +- .../linux/powerpc/powerpc64/le/libc.abilist | 18 ++ .../linux/powerpc/powerpc64/le/libdl.abilist | 10 +- .../unix/sysv/linux/riscv/rv32/libc.abilist | 18 ++ .../unix/sysv/linux/riscv/rv32/libdl.abilist | 10 +- .../unix/sysv/linux/riscv/rv64/libc.abilist | 18 ++ .../unix/sysv/linux/riscv/rv64/libdl.abilist | 10 +- .../unix/sysv/linux/s390/s390-32/libc.abilist | 19 ++ .../sysv/linux/s390/s390-32/libdl.abilist | 14 +- .../unix/sysv/linux/s390/s390-64/libc.abilist | 18 ++ .../sysv/linux/s390/s390-64/libdl.abilist | 12 +- sysdeps/unix/sysv/linux/sh/Versions | 1 + sysdeps/unix/sysv/linux/sh/be/libc.abilist | 19 ++ sysdeps/unix/sysv/linux/sh/be/libdl.abilist | 14 +- sysdeps/unix/sysv/linux/sh/le/libc.abilist | 19 ++ sysdeps/unix/sysv/linux/sh/le/libdl.abilist | 14 +- .../sysv/linux/sparc/sparc32/libc.abilist | 19 ++ .../sysv/linux/sparc/sparc32/libdl.abilist | 14 +- .../unix/sysv/linux/sparc/sparc64/Versions | 1 + .../sysv/linux/sparc/sparc64/libc.abilist | 19 ++ .../sysv/linux/sparc/sparc64/libdl.abilist | 14 +- .../unix/sysv/linux/x86_64/64/libc.abilist | 18 ++ .../unix/sysv/linux/x86_64/64/libdl.abilist | 12 +- .../unix/sysv/linux/x86_64/x32/libc.abilist | 18 ++ .../unix/sysv/linux/x86_64/x32/libdl.abilist | 10 +- sysdeps/x86/Makefile | 13 +- 114 files changed, 1131 insertions(+), 962 deletions(-) delete mode 100644 dlfcn/sdladdr.c delete mode 100644 dlfcn/sdladdr1.c delete mode 100644 dlfcn/sdlclose.c delete mode 100644 dlfcn/sdlerror.c delete mode 100644 dlfcn/sdlinfo.c delete mode 100644 dlfcn/sdlmopen.c delete mode 100644 dlfcn/sdlopen.c delete mode 100644 dlfcn/sdlsym.c delete mode 100644 dlfcn/sdlvsym.c delete mode 100644 stdio-common/iovfwscanf.c
Comments
* Florian Weimer via Libc-alpha: > This patch series removes all code from libdl.so.2. I have not removed > the shared object itself because I want to mirror what we are doing for > libpthread, and the discussion there is still ongoing. > > There is an oddity because for several targets, the baseline ABI version > for libdl is GLIBC_2.0 and not GLIBC_2.2. This cannot be expressed with > the existing Versions framework. Since the affected targets are more or > less on the way out anyway (hppa, ia64, sh, sparc64), I didn't > overdesign the solution and emitted the required version nodes directly > in scripts/versions.awk. > > This move also happens on Hurd because the implementation isn't > separate. > > This fixes a POSIX conformance issue with the c99 command because POSIX > requires that dlopen etc. are available without -ldl. > > Tested on i386-linux-gnu and x86_64-linux-gnu. Built with > build-many-glibcs.py (including most intermediate steps). I should have mentioned that I'm removing the strange double-build with those dlfcn/sdl*.c files. This is why the files have somewhat different layout after the move. I do not see any value in the dlfcn/sdl*.c construct. The new version relies on compiler inlining to remove redudant functions. Thanks, Florian
* Florian Weimer via Libc-alpha: > * Florian Weimer via Libc-alpha: > >> This patch series removes all code from libdl.so.2. I have not removed >> the shared object itself because I want to mirror what we are doing for >> libpthread, and the discussion there is still ongoing. >> >> There is an oddity because for several targets, the baseline ABI version >> for libdl is GLIBC_2.0 and not GLIBC_2.2. This cannot be expressed with >> the existing Versions framework. Since the affected targets are more or >> less on the way out anyway (hppa, ia64, sh, sparc64), I didn't >> overdesign the solution and emitted the required version nodes directly >> in scripts/versions.awk. >> >> This move also happens on Hurd because the implementation isn't >> separate. >> >> This fixes a POSIX conformance issue with the c99 command because POSIX >> requires that dlopen etc. are available without -ldl. >> >> Tested on i386-linux-gnu and x86_64-linux-gnu. Built with >> build-many-glibcs.py (including most intermediate steps). > > I should have mentioned that I'm removing the strange double-build with > those dlfcn/sdl*.c files. This is why the files have somewhat different > layout after the move. I do not see any value in the dlfcn/sdl*.c > construct. The new version relies on compiler inlining to remove > redudant functions. And I've pushed a rebase series to the fw/libdl branch. Florian