public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/31719] New: --enable-hardcoded-path-in-tests doesn't work with -Wl,--enable-new-dtags
@ 2024-05-10  1:26 hjl.tools at gmail dot com
  2024-05-10  3:49 ` [Bug dynamic-link/31719] " cvs-commit at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2024-05-10  1:26 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31719

            Bug ID: 31719
           Summary: --enable-hardcoded-path-in-tests doesn't work with
                    -Wl,--enable-new-dtags
           Product: glibc
           Version: 2.34
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
                CC: skpgkp2 at gmail dot com
  Target Milestone: ---

On Fedora 40/x86-64, build glibc 2.34 with --enable-hardcoded-path-in-tests
causes:

FAIL: assert/tst-assert-c++
FAIL: assert/tst-assert-g++
FAIL: debug/tst-fortify-cc-default-1
FAIL: debug/tst-fortify-cc-default-2
FAIL: debug/tst-fortify-cc-default-3
FAIL: debug/tst-fortify-cc-lfs-1
FAIL: debug/tst-fortify-cc-lfs-2
FAIL: debug/tst-fortify-cc-lfs-3
FAIL: debug/tst-fortify-cc-nongnu-1
FAIL: debug/tst-fortify-cc-nongnu-2
FAIL: debug/tst-fortify-cc-nongnu-3

The problems are

1. ld defaults to --enable-new-dtags.
2. When --enable-hardcoded-path-in-tests is used, DT_RUNPATH is generated
instead of DT_RPATH:

Dynamic section at offset 0x10d20 contains 31 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000001d (RUNPATH)            Library runpath:
[/export/build/gnu/tools-build/glibc-release/build-x86_64-linux:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/math:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/elf:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/dlfcn:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/nss:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/nis:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/rt:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/resolv:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/mathvec:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/support:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/crypt:/export/build/gnu/tools-build/glibc-release/build-x86_64-linux/nptl]

Unlike DT_RPATH, DT_RUNPATH only applies when loading libstdc++.so.6 and
doesn't
apply to DT_NEEDED entries in libstdc++.so.6, which leads to

./debug/tst-fortify-cc-default-1:
/export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6:
version `GLIBC_2.36' not found (required by /lib64/libm.so.6)
./debug/tst-fortify-cc-default-1:
/export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6:
version `GLIBC_ABI_DT_RELR' not found (required by /lib64/libm.so.6)

/lib64/libm.so.6 is loaded by DT_NEEDED of libstdc++.so.6.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-05-10 13:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-10  1:26 [Bug dynamic-link/31719] New: --enable-hardcoded-path-in-tests doesn't work with -Wl,--enable-new-dtags hjl.tools at gmail dot com
2024-05-10  3:49 ` [Bug dynamic-link/31719] " cvs-commit at gcc dot gnu.org
2024-05-10 12:04 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:05 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:05 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:06 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:06 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:46 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:46 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:47 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:47 ` cvs-commit at gcc dot gnu.org
2024-05-10 12:47 ` cvs-commit at gcc dot gnu.org
2024-05-10 13:17 ` cvs-commit at gcc dot gnu.org
2024-05-10 13:40 ` cvs-commit at gcc dot gnu.org
2024-05-10 13:41 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).