FWIW, it seems that the NetBSD ELF `ldd' works with shared libraries. i don't have an a.out system to test with but you can probably ignore that as most netbsd port have switched or are in the process of switching to ELF.