From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1968) id 809FF381A7CF; Wed, 8 Jun 2022 18:57:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 809FF381A7CF Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Paul E. Murphy To: glibc-cvs@sourceware.org Subject: [glibc] nptl_db: disable DT_RELR on libthread_db.so X-Act-Checkin: glibc X-Git-Author: Paul E. Murphy X-Git-Refname: refs/heads/master X-Git-Oldrev: c2f39be490150aa748bc74d78d7ee122188a30cf X-Git-Newrev: aa13fd16183949bbc40b010552e2e42003ebee62 Message-Id: <20220608185707.809FF381A7CF@sourceware.org> Date: Wed, 8 Jun 2022 18:57:07 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 18:57:07 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=aa13fd16183949bbc40b010552e2e42003ebee62 commit aa13fd16183949bbc40b010552e2e42003ebee62 Author: Paul E. Murphy Date: Wed Jun 1 16:19:49 2022 +0000 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 Diff: --- nptl_db/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nptl_db/Makefile b/nptl_db/Makefile index ed923a41e5..2360e53c88 100644 --- a/nptl_db/Makefile +++ b/nptl_db/Makefile @@ -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