[v3,00/16] Move libdl into libc

Message ID cover.1622469908.git.fweimer@redhat.com
Headers show
Series
  • Move libdl into libc
Related show

Message

H.J. Lu via Libc-alpha May 31, 2021, 2:10 p.m.
Changes from v2:

I removed a couple more references to _IO_vfwscanf.

The ABI extension kludge no longer lists symbols explicitly.  Instead,
it relies on correctness of the compat_symbol macros.  These macros are
already tested on other architectures, and they are also tested on the
affected architectures against the abilist files, so this should be
acceptable.

To make things more explicit, I added additional uses of local: * to the
generated version script, which in turn needs some Versions file
updates.

dlfcn/tststatic2 now uses _exit instead of malloc as the test symbol and
has a comment about it.

Tested on i686-linux-gnu, x86_64-linux-gnu.  Built by
build-many-glibcs.py.

Florian Weimer (16):
  stdio-common: Remove _IO_vfwscanf
  Add missing symbols to Version files
  scripts/versions.awk: Add local: * to all version nodes
  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                                |  55 +++---
 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                            |  10 +-
 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                            |  10 +-
 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 +++-----
 inet/Versions                                 |   2 +-
 io/Versions                                   |   1 +
 libio/Versions                                |   2 +
 libio/libio.h                                 |   2 -
 malloc/Makefile                               |   3 -
 misc/Makefile                                 |   2 -
 nptl/Makefile                                 |   7 -
 nptl/Versions                                 |   8 +
 nss/Makefile                                  |   5 -
 posix/Versions                                |   4 +
 resolv/Makefile                               |  19 +-
 scripts/versions.awk                          |  32 +++-
 stdio-common/Makefile                         |   2 +-
 stdio-common/iovfwscanf.c                     |  38 ----
 stdlib/Makefile                               |   8 +-
 string/Makefile                               |   1 -
 sysdeps/generic/ldsodefs.h                    |   3 +
 sysdeps/ieee754/ldbl-128ibm-compat/Makefile   |   1 -
 sysdeps/mach/hurd/i386/Versions               |   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/Versions              |  12 ++
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  18 ++
 sysdeps/unix/sysv/linux/aarch64/libdl.abilist |  10 +-
 sysdeps/unix/sysv/linux/alpha/Versions        |  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/Versions         |   4 -
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  19 ++
 sysdeps/unix/sysv/linux/i386/libdl.abilist    |  14 +-
 sysdeps/unix/sysv/linux/ia64/Versions         |  11 +-
 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 +-
 sysdeps/unix/sysv/linux/mips/Versions         |   4 +
 .../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 +-
 sysdeps/unix/sysv/linux/powerpc/Versions      |   4 +
 .../sysv/linux/powerpc/powerpc32/Versions     |   8 +-
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  19 ++
 .../linux/powerpc/powerpc32/libdl.abilist     |  14 +-
 .../powerpc/powerpc32/nofpu/libc.abilist      |  19 ++
 .../sysv/linux/powerpc/powerpc64/Versions     |   7 +-
 .../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 +-
 sysdeps/unix/sysv/linux/s390/s390-32/Versions |   3 -
 .../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           |   4 +-
 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 +-
 sysdeps/unix/sysv/linux/sparc/Versions        |  11 +-
 .../unix/sysv/linux/sparc/sparc32/Versions    |   3 -
 .../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 +-
 132 files changed, 1193 insertions(+), 1016 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

-- 
2.31.1