Add lto and none-lto input support for ld -r

This patch adds lto and none-lto input support for ld -r so that
LTO can be used with ld -r without Makefile changes.  It is useful
for Linux kernel build with LTO.
Add test for nm on mixed LTO/non-LTO object
Don't check the plugin target twice