title: SYSV vs. Linux/GNU ELF formats
body: <p>The question is in the context of the following question: <a href="https://stackoverflow.com/questions/45782514/why-are-libraries-not-found-even-though-they-are-clearly-on-the-l-path?noredirect=1#comment78524473_45782514">Why are libraries not found, even though they are clearly on the -L path?</a> . It seems that my libraries and my object file have a different ELF format, which might cause the linker to not "find" the libraries.</p>
  
  <p>Now, this leads to a couple of questions:</p>
  
  <ol>
  <li><p>It seems that my compiler normally generates SYSV ELF files. (Checked with <code>file</code>). However, for that particular C++ source, it generates a Linux/GNU ELF object file. I wonder why, so I reduced that source to an empty main method - and suddenly I get a SYSV object file. <strong>What inside a C++ source file can cause the compiler to switch the ELF format?</strong></p></li>
  <li><p><strong>Is it true or false that I can not link Linux/GNU together with SYSV ELF?</strong></p></li>
  <li><p><strong>Is there an option to force the compiler to create a certain ELF format?</strong></p></li>
  </ol>
  
  <p>I'm working with a Cray g++ (GCC) 5.3.0 20151204.</p>