LD/testsuite: Expand archive verification to `--whole-archive' feature

Expand archive verification to cover the `--whole-archive' feature,
adding link map and verbose output matching to verify the correct
archive members are added and the unwanted ones omitted.

Adjust the linker flags accordingly for XCOFF targets, by switching from
the `-bexpall' option to `-unix' (`-bexpfull' would do too, but has some
test coverage already, unlike `-unix', which is a superset of the former
option), so that additional symbols pulled with `--whole-archive' aren't
discarded by linker garbage collection.

This test expansion has revealed the lack of thin archive support in AR
for Alpha/VMS and XCOFF targets, despite apparent presence of relevant
code in the respective BFD backends.  With `ar rcT' invocation a regular
archive is silently produced instead.

Rather than making the relevant tests overly permissive, XFAIL them for
the affected targets, referring PR binutils/33600.
9 files changed