title: Relative path for shared libraries when analysing core dumps
body: <p>Is it possible to specify relative paths for shared libraries when I do core analysis (I would like to specify relative paths at compile time instead of debug time)</p>
  
  <pre><code>(gdb) info sharedlibrary
  From                To                  Syms Read   Shared Object Library
  0x00007f4433ffef00  0x00007f443402cc08  Yes (*)     /lib/libssl.so.0.9.8
  0x00007f44334d6a00  0x00007f44335e9920  Yes         /lib/libc.so.6
  0x00007f443423eaf0  0x00007f4434257994  Yes         /lib64/ld-linux-x86-64.so.2
                                          No          ./lib/myplugin.so
                                          No          /opt/lib/mylibc.so
  0x00007f443237a190  0x00007f443237d7f8  Yes         /lib/librt.so.1
  0x00007f44320f8ef0  0x00007f44321392d8  Yes         /lib/libm.so.6
  0x00007f4431ee08b0  0x00007f4431eeffe8  Yes (*)     /lib/libgcc_s.so.1
  </code></pre>
  
  <p>I will be more specific about what and why does not work for me:</p>
  
  <ol>
  <li>LD_LIBRARY_PATH can specify relative path in respect to Current Working Directory. This does not fit my needs because I need relative path in respect to location of executable</li>
  <li>RPATH with $ORIGIN is intended to be relative path in respect to location of executable. But it does not fit my needs because it expands to absolute path when I try to do core analysis.</li>
  </ol>
  
  <p>So how can I specify relative path for shared libraries in respect to location of executable?</p>