title: What is the 'soname' option for building shared libraries for?
body: <p>I learned the "<strong><a href="http://tldp.org/HOWTO/Program-Library-HOWTO/" rel="noreferrer">Program Library HOWTO</a></strong>". It mention that using <code>soname</code> to manage the version like follow.</p>
  
  <pre><code>gcc -shared -fPIC -Wl,-soname,libfoo.so.1  -o libfoo.so.1.0.0 foo.c
  ln -s libfoo.so.1.0.0  libfoo.so.1
  ln -s libfoo.so.1 libfoo.so
  </code></pre>
  
  <p>And I get the information that if the <code>soname</code> is not set. it will be equal to libfoo.so.1.0.0 ,see the answer from <a href="https://stackoverflow.com/questions/4071962/how-does-linker-find-shared-library-without-soname">here</a>.</p>
  
  <p>And I find that it also can work without soname , like following   </p>
  
  <pre><code> gcc -shared -fPIC -o libfoo.so.1.0.0 foo.c
   ln -s libfoo.so.1.0.0  libfoo.so.1
   ln -s libfoo.so.1 libfoo.so
  </code></pre>
  
  <p>So I think that the only one useful point is that the <code>soname</code> option can tell you the version of the shared library when you use <code>readelf -d libfoo.so</code> command to check it. </p>
  
  <p><strong>What else can it do?</strong></p>