[PATCH v4 00/11] glibc-hwcaps support

Florian Weimer fweimer@redhat.com
Mon Nov 9 18:40:10 GMT 2020


This patch series incorporates Adhemerval's feedback.  It picks up the
suggestion for introducing enum opt_format in ldconfig.

It also fixes a a ldconfig bug (wrong size in xmalloc call) uncovered by
testing on i686-linux-gnu.

I have dropped the s390x patch until I have located a suitable machine
on which to test it.  We also need to discuss how to achieve GCC
alignment there.

Patch order is different than before because both the x86_64 and
powerpc64le patches contain tests now, including a test that runs the
ld.so-based test without special options in the container, to check for
ld.so.cache support.

The powerpc64le patch aligns the subdirectory selection with GCC.

I feel like this series has a reasonable level of test coverage.  It
does not test all possible permutations (ld.so option combinations and
ld.so.cache contents), but I hope that's okay.

(Not sure if this actually v4, I sort of lost count.)

Thanks,
Florian

Florian Weimer (11):
  support: Add support_copy_file
  elf: Introduce enum opt_format in the ldconfig implementation
  elf: Add glibc-hwcaps support for LD_LIBRARY_PATH
  elf: Add endianness markup to ld.so.cache
  elf: Add extension mechanism to ld.so.cache
  elf: Implement a string table for ldconfig, with tail merging
  elf: Implement tail merging of strings in ldconfig
  elf: Process glibc-hwcaps subdirectories in ldconfig
  elf: Add glibc-hwcaps subdirectory support to ld.so cache processing
  x86_64: Add glibc-hwcaps support
  powerpc64le: Add glibc-hwcaps support

 elf/Makefile                                  |  90 +++-
 elf/cache.c                                   | 413 +++++++++++++++---
 elf/dl-cache.c                                | 202 ++++++++-
 elf/dl-hwcaps-subdirs.c                       |  29 ++
 elf/dl-hwcaps.c                               | 216 ++++++++-
 elf/dl-hwcaps.h                               | 124 ++++++
 elf/dl-hwcaps_split.c                         |  77 ++++
 elf/dl-load.c                                 |   7 +-
 elf/dl-main.h                                 |  11 +-
 elf/dl-support.c                              |   5 +-
 elf/dl-usage.c                                |  68 ++-
 elf/ldconfig.c                                | 164 +++++--
 elf/markermodMARKER-VALUE.c                   |  29 ++
 elf/rtld.c                                    |  18 +
 elf/stringtable.c                             | 209 +++++++++
 elf/stringtable.h                             |  64 +++
 elf/stringtable_free.c                        |  33 ++
 elf/tst-dl-hwcaps_split.c                     | 139 ++++++
 elf/tst-glibc-hwcaps-cache.c                  |  45 ++
 .../etc/ld.so.conf                            |   2 +
 elf/tst-glibc-hwcaps-cache.root/postclean.req |   0
 elf/tst-glibc-hwcaps-cache.script             |  18 +
 elf/tst-glibc-hwcaps-mask.c                   |  31 ++
 elf/tst-glibc-hwcaps-prepend-cache.c          | 133 ++++++
 .../postclean.req                             |   0
 elf/tst-glibc-hwcaps-prepend.c                |  32 ++
 elf/tst-glibc-hwcaps.c                        |  28 ++
 elf/tst-stringtable.c                         | 141 ++++++
 support/Makefile                              |   1 +
 support/support.h                             |   5 +
 support/support_copy_file.c                   |  43 ++
 sysdeps/generic/dl-cache.h                    | 233 +++++++++-
 sysdeps/generic/ldconfig.h                    |  27 +-
 sysdeps/generic/ldsodefs.h                    |  20 +-
 sysdeps/powerpc/powerpc64/le/Makefile         |  28 ++
 .../powerpc/powerpc64/le/dl-hwcaps-subdirs.c  |  46 ++
 .../powerpc/powerpc64/le/tst-glibc-hwcaps.c   |  54 +++
 sysdeps/x86_64/Makefile                       |  39 ++
 sysdeps/x86_64/dl-hwcaps-subdirs.c            |  66 +++
 sysdeps/x86_64/tst-glibc-hwcaps.c             |  76 ++++
 40 files changed, 2839 insertions(+), 127 deletions(-)
 create mode 100644 elf/dl-hwcaps-subdirs.c
 create mode 100644 elf/dl-hwcaps_split.c
 create mode 100644 elf/markermodMARKER-VALUE.c
 create mode 100644 elf/stringtable.c
 create mode 100644 elf/stringtable.h
 create mode 100644 elf/stringtable_free.c
 create mode 100644 elf/tst-dl-hwcaps_split.c
 create mode 100644 elf/tst-glibc-hwcaps-cache.c
 create mode 100644 elf/tst-glibc-hwcaps-cache.root/etc/ld.so.conf
 create mode 100644 elf/tst-glibc-hwcaps-cache.root/postclean.req
 create mode 100644 elf/tst-glibc-hwcaps-cache.script
 create mode 100644 elf/tst-glibc-hwcaps-mask.c
 create mode 100644 elf/tst-glibc-hwcaps-prepend-cache.c
 create mode 100644 elf/tst-glibc-hwcaps-prepend-cache.root/postclean.req
 create mode 100644 elf/tst-glibc-hwcaps-prepend.c
 create mode 100644 elf/tst-glibc-hwcaps.c
 create mode 100644 elf/tst-stringtable.c
 create mode 100644 support/support_copy_file.c
 create mode 100644 sysdeps/powerpc/powerpc64/le/dl-hwcaps-subdirs.c
 create mode 100644 sysdeps/powerpc/powerpc64/le/tst-glibc-hwcaps.c
 create mode 100644 sysdeps/x86_64/dl-hwcaps-subdirs.c
 create mode 100644 sysdeps/x86_64/tst-glibc-hwcaps.c

-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-alpha mailing list