nptl_db: disable DT_RELR on libthread_db.so

Some nptl tests inadvertently use the host's gdb to verify
libthread_db.so, which is loaded with the host's runtime.  This causes
a couple of test failures when the host glibc does not support DT_RELR.

The not correct, but simple, workaround is to build without DT_RELR
as this library is otherwise likely to load on glibc 2.17 and newer
today.

This allows tst-pthread-gdb-attach{,-static} to continue working
when testing on a gdb loaded with an older glibc.

This avoids a failure in tst-pthread-gdb-attach similar to:

  Trying host libthread_db library: .../build/glibc/nptl_db/libthread_db.so.1.
  dlopen failed: /lib64/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by .../build/glibc/nptl_db/libthread_db.so.1).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Paul E. Murphy 2022-06-01 16:19:49 +00:00
parent c2f39be490
commit aa13fd1618
1 changed files with 6 additions and 0 deletions

View File

@ -49,6 +49,12 @@ libthread_db-inhibit-o = $(filter-out .os,$(object-suffixes))
# The ps_* callback functions are not defined.
libthread_db.so-no-z-defs = yes
# This is a hack. This is not the correct solution. When this glibc
# is tested, the gdb used could be loaded by the host glibc, which
# may not support DT_RELR, and report a failure instead of unsupported.
# For now, build this without DT_RELR support to avoid this situation.
libthread_db.so-no-dt-relr = yes
tests-special += $(objpfx)db-symbols.out
include ../Rules