diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8aa739749f0..ca011e4eb25 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2021-02-08 Luis Machado + + * gdb.base/gnu-ifunc.exp (build): Pass -Wl,z,lazy. + 2021-02-08 Tom de Vries * gdb.dwarf2/enqueued-cu-base-addr.exp: Fix inter-CU reference. diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp index d6064d3c4ac..4ec529130ce 100644 --- a/gdb/testsuite/gdb.base/gnu-ifunc.exp +++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp @@ -64,6 +64,10 @@ proc build {resolver_attr resolver_debug final_debug} { set lib_opts {} set final_opts {} + # Force lazy binding so we don't resolve everything at process startup. + lappend exec_opts "additional_flags=-Wl,-z,lazy" + lappend lib_opts "additional_flags=-Wl,-z,lazy" + if {$resolver_attr} { lappend lib_opts "additional_flags=-DIFUNC_RESOLVER_ATTR" }