title: Linux - Execution of instructions on stack
body: <p>I have a tool, which I compile using the Makefiles. It is a very big tool and has many Makefiles. It generates a shared library (.so file) after compilation. When I checked with <code>execstack -q &lt;file.so&gt;</code>, it shows that the execution of instructions on stack is required for this library. </p>
  
  <p>To enable stack execution for any program we can compile it by giving the option <code>-z execstack</code> to <code>gcc</code>. Now, I am explicitly not providing this option anywhere, but still for the generated shared library this flag gets enabled. </p>
  
  <p>I am linking some libraries for which this flag is enabled. Is that the reason for this flag being enabled for the shared library ?</p>
  
  <p>If No, what else can be the reason ?</p>