title: How to list dependencies of c/c++ static library?
body: <p>For a static library (.a file), how to list the module-level dependencies of it?</p>
  <p>I know for a shared library (.so), we can use <em>objdump</em> or <em>readelf</em> to do this:</p>
  <pre><code>objdump -p test.so
  </code></pre>
  <p>or</p>
  <pre><code>readelf -d test.so
  </code></pre>
  <p>I can get something like</p>
  <blockquote>
  <p>NEEDED               libOne.so</p>
  <p>NEEDED               libc.so.6</p>
  </blockquote>
  <p>But for a static library, I can only get the dependencies in symbol-level, for example, by running</p>
  <pre><code>objdump -T test.a
  </code></pre>
  <p>I will get some thing like:</p>
  <blockquote>
  <p>00000000      DF <em>UND</em>    00000000 QByteArray::mid(int, int) const</p>
  <p>00000000      DF <em>UND</em>    00000000 QUrl::fromEncoded(QByteArray const&amp;)</p>
  <p>00000000      DF <em>UND</em>    00000000 QFileInfo::fileName() const</p>
  </blockquote>
  <p>But I need the information in module-level, does anyone know how to get that information?</p>