version script support misdetected when using mold linker
When using mold as a linker libslirp
decides it does not support --version-script
even though it does. The reason being test for support uses real libslirp.map
:
https://gitlab.freedesktop.org/slirp/libslirp/-/blob/ce314e39458223c2c42245fe536fbe1bcd94e9b1/meson.build#L144-149
and mold
fails if it cannot find symbol that is present in version script:
mold: error: /home/users/builder/rpm/BUILD/libslirp-4.8.0/src/libslirp.map: cannot assign versi
on `SLIRP_4.0` to symbol `slirp_add_exec`: symbol not found
mold: error: /home/users/builder/rpm/BUILD/libslirp-4.8.0/src/libslirp.map: cannot assign version `SLIRP_4.0` to symbol `slirp_add_guestfwd`: symbol not found
mold: error: /home/users/builder/rpm/BUILD/libslirp-4.8.0/src/libslirp.map: cannot assign version `SLIRP_4.0` to symbol `slirp_add_hostfwd`: symbol not found
...