The test had a few style issues, and I noticed a hole in the coverage (namely that the search order wasn't tested). Adding cases for the hole in turn meant other cases weren't important.
The .so test case isn't important, since the code is shared code, so I've removed it. Additionally, I've modified the usage of the "bar" directive to show that an unneeded library must still be present, or the link will fail, even though it isn't linked in.
Nit: delete -unknown-linux as this is a generic ELF behavior.