ld: Build libpr23169a.so with -z lazy
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 7 Aug 2023 17:23:16 +0000 (10:23 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 14 Aug 2023 15:43:01 +0000 (08:43 -0700)
pr23169b test only works with lazy binding.  To work with linker which
disables lazy binding by default, build pr23169b binaries with -z lazy.

PR ld/30698
* ld-ifunc/ifunc.exp: Build pr23169b binaries with -z lazy.

ld/testsuite/ld-ifunc/ifunc.exp

index edabcc3f744a8e21f99e40d548572ade09740f11..2bf656e73b28a4cfccb8f6c198d2c084d809f105 100644 (file)
@@ -604,7 +604,7 @@ run_cc_link_tests [list \
     ] \
     [list \
        "Build libpr23169a.so" \
-       "-shared" \
+       "-shared -Wl,-z,lazy" \
        "-fPIC -O2 -g" \
        { pr23169a.c } \
        {} \
@@ -751,7 +751,7 @@ run_ld_link_exec_tests [list \
     ] \
     [list \
        "Run pr23169b" \
-       "-pie -Wl,--no-as-needed tmpdir/libpr23169a.so" \
+       "-pie -Wl,--no-as-needed,-z,lazy tmpdir/libpr23169a.so" \
        "" \
        { pr23169b.c pr23169c.c } \
        "pr23169b" \