title: In LINUX determine if a .a library/archive 32-bit or 64-bit?
body: <p>We distribute in Linux a static lib in both 64-bit and 32-bit versions.  When troubleshooting a customer, I would like my diagnostic shell script to quickly eliminate the issue by checking the .a archive file to detetmine whether it is 32 or 64 bit.  The methods that occur to me are less than elegant:</p>
  
  <ol>
  <li><p>extract a .o member and ask the "file" command (e.g., ELF 32-bit etc)  </p></li>
  <li><p>start including a dummy member coded to indicate, e.g. 32bit.o/64bit.o and use "ar -t" to check</p></li>
  </ol>
  
  <p>I have tried "strings xyz.a | grep 32" but this doesn't work well over versions.  Not a heartbreaker problem, but if you know of an elegant solution, I would like to know.</p>