title: Why shared library path is hardcoded in execuatble?
body: <p>Recently I got a test binary. When I checked it using objdump, I observed that it includes hard coded library path. Why it is needed to to hardcode the path like that? Shouldn't the path be taken from SHELL environment variables or -L parameter instead ?</p>
  
  <blockquote>
    <p>objdump -p testprog</p>
  </blockquote>
  
  <p>The output includes the hardcoded path to shared libraries:</p>
  
  <pre><code>....
    NEEDED      /home/test/lib/liba.so
    NEEDED      /home/test/lib/libb.so
    NEEDED      /home/test/lib/libc.so
  ....
  </code></pre>