>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
Tom> Hence we need to make sure that version-script filtering happens Tom> on every ELF-based platform, not just the most popular ones. I see Tom> that the FreeBSD and NetBSD stanzas in Makefile.shlib also have Tom> "ifdef ELF_SYSTEM" portions, so probably we need to put the Tom> version-script stuff into those too.
I tested adding your patch into the FreeBSD stanza and it worked for me, FWIW. That was on a system which still has GNU ld, but I also tried a test program using ld.lld and the same option and version script file works.