Build gdb.base/gnu-ifunc.exp with lazy binding
The test expects the ifunc resolver to run lazily, at a later stage.
Depending on the distro and toolchain configuration, this is not the
case. Some configurations use non-lazy binding and thus the ifunc resolver
resolves all the ifunc references very early in the process startup, before
main.
Ubuntu is one such case. It has switched its toolchains to pass -Wl,z,now by
default, since 16.04. This wasn't a problem before 20.04 (at least for
aarch64) because the toolchains did not support ifunc's.
Forcing lazy binding makes the test run as expected, as opposed to the 80 or
so failures it showed before the change.
Tested on aarch64-linux/x86_64-linux Ubuntu 20.04.
gdb/testsuite:
2021-02-08 Luis Machado <luis.machado@linaro.org>
* gdb.base/gnu-ifunc.exp (build): Pass -Wl,z,lazy.