title: ELF executables: required version information for imported symbols
body: <p>I was hoping that every dynamically linked ELF binary has </p>
  
  <ol>
  <li>a <code>.gnu.version_r</code> section (or another section tagged <code>DT_VERNEED</code>), and that </li>
  <li>this section contains a required version for every symbol imported from a dynamically linked shared object.</li>
  </ol>
  
  <p>Yet, there seem to be cases possible in which the compiler/linker adds an <code>DT_NEEDED</code> entry (i.e. embedds the name of the required shared object) without any required version information.</p>
  
  <p>The closest statements I could find were in the <a href="https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/symversion.html" rel="nofollow">Linux Standard Base Core Specification 3.1</a></p>
  
  <blockquote>
    <p>All ELF objects may provide or depend on versioned symbols</p>
  </blockquote>
  
  <p>and, a bit more precise, in <a href="http://www.akkadia.org/drepper/symbol-versioning" rel="nofollow">http://www.akkadia.org/drepper/symbol-versioning</a>:</p>
  
  <blockquote>
    <p>The implementation allows every DSO to either use versions for their
    symbols or not.  Depending on whether the DSO an object is linked
    against had symbols or not, the reference to the DSO requires symbols
    or not.</p>
  </blockquote>
  
  <p>If I understand it correctly, this says that it is possible to create shared objects without version information for an exposed symbol. And thus, there can be references to these symbols without <em>required</em> version information.</p>
  
  <p>Is my interpretation correct?</p>
  
  <p>These cases should be rare though, since, why would the compiler/linker not include any version information?</p>