From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C1DE9388F010; Wed, 28 Jul 2021 21:15:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1DE9388F010 From: "i at maskray dot me" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/28154] New: [test] sysdeps/x86/tst-ifunc-isa-* lazy binding failure with ld.lld Date: Wed, 28 Jul 2021 21:15:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: i at maskray dot me X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2021 21:15:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28154 Bug ID: 28154 Summary: [test] sysdeps/x86/tst-ifunc-isa-* lazy binding failure with ld.lld Product: glibc Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Extracted from https://sourceware.org/pipermail/libc-alpha/2021-July/129450.html To build LLD 13.0.0: # https://github.com/llvm/llvm-project/ origin/release/13.x cmake -H. -Bout/release -G Ninja -DCMAKE_BUILD_TYPE=3DRelease -DLLVM_ENABLE_PROJECTS=3D'clang;lld' ninja -C out/release lld I use sudo ln -sf $PWD/out/release/bin/lld /usr/local/bin/ld to ensure the glibc build system definitely picks ld =3D> lld (messing around with LDFLAGS=3D-fuse-ld=3Dlld may work as well) `make check` says sysdeps/x86/tst-ifunc-isa-* fail. The tests work with LD_BIND_NOW=3D1. I debugged a bit. ld.lld and GNU ld place IRELATIVE differently. IIUC some ports of GNU ld use .rela.dyn and behave similar to ld.lld. The tests happen to work with GNU ld because the IRELATIVE for foo_ifunc is placed after JUMP_SLOT in .repa.plt. The test needs to call __x86_get_cpuid_feature_leaf which is defined in a different TU. IMHO such ifunc does not guaranteed to work. --=20 You are receiving this mail because: You are on the CC list for the bug.=