title: specify glibc on debugging core dump with gdb
body: <p>I have a program that crashed on RHEL 6.5, also I have a coredump file.</p>
  
  <p>I want to debug it on RHEL 6.4, but it has another version of glibc. I put glibc.so.6 from RHEL 6.5 to lib/ directory, but can't set gdb up to use it:</p>
  
  <pre><code>[nskdvlp@srv2-csd-mong01 snmp_int]$ LD_LIBRARY_PATH=/u01/app/maa/snmp_int/lib gdb bin/snmp_int
  Reading symbols from /u01/app/maa/snmp_int/bin/snmp_int...done.
  (gdb) info sharedlibrary
  No shared libraries loaded at this time.
  (gdb) set solib-search-path lib
  warning: .dynamic section for "/lib64/libc.so.6" is not at the expected address (wrong library or version mismatch?)
  Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
  Loaded symbols for /lib64/libc.so.6
  Reading symbols from /u01/app/maa/snmp_int/lib/libsnmp_int_snmp.so.6.0.5...done.
  Loaded symbols for /u01/app/maa/snmp_int/lib/libsnmp_int_snmp.so.6.0.5
  (gdb) core core.110358
  [New Thread 110358]
  [New Thread 110367]
  warning: .dynamic section for "/lib64/libc.so.6" is not at the expected address (wrong library or version mismatch?)
  warning: Could not load shared library symbols for (0x%0*Zx)
  .
  Do you need "set solib-search-path" or "set sysroot"?
  Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
  Loaded symbols for /lib64/libdl.so.2
  (gdb) bt
  #0  0x0000003e93a32925 in ?? ()
  #1  0x0000003e93a3408d in ?? ()
  #2  0x0000000000000000 in ?? ()
  </code></pre>
  
  <p>Other .so libraries are loaded well from lib/</p>