title: Why don't the programs implemented by Golang use the functions of libc.so.6, such as socket()?
body: <p>Thanks for answering my question. I am working for a project recently. In this project, I write a shared library and set the <code>LD_PRELAOD</code> to the shared library's path. I want to intercept some programs' system calls by using this shared library, such as <code>socket(), bind(), send()</code>. It works for C-programs and Python-programs, but it doesn't work for Golang-programs. Later I know that Go-programs comply with the static libraries.
  So I tried this command: <code>go build -linkshared &lt;test-name&gt;</code>, unlucky, it failed.
  Finally, I use the command <code>nm</code> to check the symbols in the application.
  And I found these:</p>
  <pre class="lang-sh prettyprint-override"><code># nm -Do &lt;go-program-name&gt; | grep socket
  # results are as follows
  &lt;go-program-name&gt;: &lt;address&gt; T net.socket
  &lt;go-program-name&gt;: &lt;address&gt; D net.socektFunc
  &lt;go-program-name&gt;: &lt;address&gt; T syscall.socket
  
  # nm -Do &lt;C-program-name&gt; | grep socket
  &lt;C-program&gt;: U socket
  </code></pre>
  <p>And this is the screenshot.
  <a href="https://i.stack.imgur.com/osF3C.png" rel="nofollow noreferrer">enter image description here</a>
  Thanks again.</p>