Use file to check if binary (nm fails if binary is stripped from symbols)