title: Why does ld-linux-x86-64.so.2 link against unexpected location?
body: <p>I have installed a new glibc in <code>/root/tools/</code> in debian which already has a pre-installed glibc. For testing the new glibc, I type :</p>
  <pre><code>gcc test.c -Wl,-rpath=/root/tools/lib -Wl,--dynamic-linker=/root/tools/lib/ld-linux-x86-64.so.2
  </code></pre>
  <p>produces <code>a.out</code>, then type:</p>
  <pre><code>ldd a.out
  </code></pre>
  <p>it shows</p>
  <pre><code>linux-vdso.so.1 (0x00007ffd1018c000)
  libc.so.6 =&gt; /root/tools/lib/libc.so.6 (0x00007fc7f468b000)
  /root/tools/lib/ld-linux-x86-64.so.2 =&gt; /lib64/ld-linux-x86-64.so.2 (0x00007fc7f4855000)
  </code></pre>
  <p>But type <code>ls -l /root/tools/lib/ld-linux-x86-64.so.2</code> ,
  it shows <code>/root/tools/lib/ld-linux-x86-64.so.2 -&gt; ld-2.33.so</code></p>
  <p>Why does ld.so in new glibc link against ld.so in /lib64 ? How to explain this ?</p>